mirror of https://github.com/vitalif/e2fsprogs
ext2fs: fix memory leak in an error case in inode_open()
Reported-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>bitmap-optimize
parent
2150278fa2
commit
58caabc37d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue