projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
776e4aa
)
Btrfs: fix possible memory leak in btrfs_create_tree()
author
Tsutomu Itoh
<t-itoh@jp.fujitsu.com>
Wed, 9 Apr 2014 00:18:04 +0000
(09:18 +0900)
committer
Chris Mason
<clm@fb.com>
Tue, 10 Jun 2014 00:20:42 +0000
(17:20 -0700)
In btrfs_create_tree(), if btrfs_insert_root() fails, we should
free root->commit_root.
Reported-by: Alex Lyakas <alex@zadarastorage.com>
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/disk-io.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/disk-io.c
b/fs/btrfs/disk-io.c
index cf8427a7a615ea0e252a2ea2fb737a98314319fa..d3bd34e434f62f038f23599d920173f42931f405 100644
(file)
--- a/
fs/btrfs/disk-io.c
+++ b/
fs/btrfs/disk-io.c
@@
-1366,6
+1366,7
@@
struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
fail:
if (leaf) {
btrfs_tree_unlock(leaf);
+ free_extent_buffer(root->commit_root);
free_extent_buffer(leaf);
}
kfree(root);