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:
2150278
)
ext2fs: fix memory leak in an error case in inode_open()
author
Theodore Ts'o
<tytso@mit.edu>
Tue, 21 Dec 2010 23:05:07 +0000
(18:05 -0500)
committer
Theodore Ts'o
<tytso@mit.edu>
Tue, 21 Dec 2010 23:05:07 +0000
(18:05 -0500)
Reported-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/inode_io.c
patch
|
blob
|
history
diff --git
a/lib/ext2fs/inode_io.c
b/lib/ext2fs/inode_io.c
index
4faaa48
..
b3e7ce5
100644
(file)
--- a/
lib/ext2fs/inode_io.c
+++ b/
lib/ext2fs/inode_io.c
@@
-163,9
+163,10
@@
static errcode_t inode_open(const char *name, int flags, io_channel *channel)
return 0;
cleanup:
- if (data) {
+ if (io->name)
+ ext2fs_free_mem(&io->name);
+ if (data)
ext2fs_free_mem(&data);
- }
if (io)
ext2fs_free_mem(&io);
return retval;