projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91ca338
)
btrfs: Fix memory leak in btrfs_read_fs_root_no_radix()
author
Tsutomu Itoh
<t-itoh@jp.fujitsu.com>
Mon, 27 Dec 2010 06:53:10 +0000
(06:53 +0000)
committer
Chris Mason
<chris.mason@oracle.com>
Sun, 16 Jan 2011 16:30:20 +0000
(11:30 -0500)
In btrfs_read_fs_root_no_radix(), 'root' is not freed if
btrfs_search_slot() returns error.
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/disk-io.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/disk-io.c
b/fs/btrfs/disk-io.c
index
a0c37b2
..
9b1dd41
100644
(file)
--- a/
fs/btrfs/disk-io.c
+++ b/
fs/btrfs/disk-io.c
@@
-1153,6
+1153,7
@@
struct btrfs_root *btrfs_read_fs_root_no_radix(struct btrfs_root *tree_root,
}
btrfs_free_path(path);
if (ret) {
+ kfree(root);
if (ret > 0)
ret = -ENOENT;
return ERR_PTR(ret);