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:
023a1df
)
libext2fs: Fix memory leak in the Unix I/O layer when changing block size
author
Theodore Ts'o
<tytso@mit.edu>
Thu, 23 Sep 2010 17:06:31 +0000
(13:06 -0400)
committer
Theodore Ts'o
<tytso@mit.edu>
Thu, 23 Sep 2010 20:38:26 +0000
(16:38 -0400)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/unix_io.c
patch
|
blob
|
history
diff --git
a/lib/ext2fs/unix_io.c
b/lib/ext2fs/unix_io.c
index
8c599aa
..
78a1d1c
100644
(file)
--- a/
lib/ext2fs/unix_io.c
+++ b/
lib/ext2fs/unix_io.c
@@
-302,6
+302,8
@@
static errcode_t alloc_cache(io_channel channel,
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;