Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
267ff15
)
libsupport: fix memory leak in error path in quota_compute_usage()
author
Theodore Ts'o
<tytso@mit.edu>
Sat, 23 Jun 2018 02:20:51 +0000
(22:20 -0400)
committer
Theodore Ts'o
<tytso@mit.edu>
Sat, 23 Jun 2018 02:20:51 +0000
(22:20 -0400)
Fixes-Coverity-Bug: 1362023
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/support/mkquota.c
patch
|
blob
|
history
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);