Btrfs: fix incorrect freeing in scrub_stripe
authorTsutomu Itoh <t-itoh@jp.fujitsu.com>
Fri, 9 Jan 2015 08:37:52 +0000 (17:37 +0900)
committerChris Mason <clm@fb.com>
Mon, 19 Jan 2015 21:05:44 +0000 (13:05 -0800)
The address that should be freed is not 'ppath' but 'path'.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Reviewed-by: Miao Xie <miaoxie@huawei.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/scrub.c

index 9e1569ffbf6ea66f1324022db9f9aba559339c73..2f0fbc374e876f90ee1e07ecfe5704bd4021c570 100644 (file)
@@ -3053,7 +3053,7 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
 
        ppath = btrfs_alloc_path();
        if (!ppath) {
-               btrfs_free_path(ppath);
+               btrfs_free_path(path);
                return -ENOMEM;
        }