| commit | faafdb765b4ed2bb33070d998426bec0cf774344 | [log] [tgz] |
|---|---|---|
| author | Theodore Ts'o <tytso@mit.edu> | Thu Sep 23 13:06:31 2010 -0400 |
| committer | Theodore Ts'o <tytso@mit.edu> | Thu Sep 23 16:38:26 2010 -0400 |
| tree | ce2dd5126c0df3c67679edba2a49d591e38d49f0 | |
| parent | 023a1df091f9d42f826ee3737190db5de9c823b0 [diff] [blame] |
libext2fs: Fix memory leak in the Unix I/O layer when changing block size Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c index 8c599aa..78a1d1c 100644 --- a/lib/ext2fs/unix_io.c +++ b/lib/ext2fs/unix_io.c
@@ -302,6 +302,8 @@ cache->access_time = 0; cache->dirty = 0; cache->in_use = 0; + if (cache->buf) + ext2fs_free_mem(&cache->buf); if ((retval = ext2fs_get_mem(channel->block_size, &cache->buf))) return retval;