projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5929cd
)
Fix leak in __btrfs_map_block error path
author
Dave Jones
<davej@redhat.com>
Tue, 30 Jul 2013 17:42:17 +0000
(13:42 -0400)
committer
Chris Mason
<chris.mason@fusionio.com>
Sun, 1 Sep 2013 12:04:45 +0000
(08:04 -0400)
If we bail out when the stripe alloc fails, we need to undo the
earlier allocation of raid_map.
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/volumes.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/volumes.c
b/fs/btrfs/volumes.c
index 93f39b1e71737582111797790392715623f55fee..44abd151132a64ff855fea9c47f6005310940113 100644
(file)
--- a/
fs/btrfs/volumes.c
+++ b/
fs/btrfs/volumes.c
@@
-4673,6
+4673,7
@@
static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw,
}
bbio = kzalloc(btrfs_bio_size(num_alloc_stripes), GFP_NOFS);
if (!bbio) {
+ kfree(raid_map);
ret = -ENOMEM;
goto out;
}