Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
libsupport: fix memory leak in error path in quota_compute_usage()
[tools/e2fsprogs.git]
/
lib
/
support
/
mkquota.c
diff --git
a/lib/support/mkquota.c
b/lib/support/mkquota.c
index
efc37cb
..
d136a91
100644
(file)
--- a/
lib/support/mkquota.c
+++ b/
lib/support/mkquota.c
@@
-484,8
+484,10
@@
errcode_t quota_compute_usage(quota_ctx_t qctx)
}
inode_size = fs->super->s_inode_size;
inode = malloc(inode_size);
- if (!inode)
+ if (!inode) {
+ ext2fs_close_inode_scan(scan);
return ENOMEM;
+ }
while (1) {
ret = ext2fs_get_next_inode_full(scan, &ino,
EXT2_INODE(inode), inode_size);