瀏覽代碼

Btrfs: disk-io.c (open_ctree): avoid leaks upon allocation failure

Signed-off-by: Chris Mason <chris.mason@oracle.com>
Jim Meyering 16 年之前
父節點
當前提交
83afeac42c
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      fs/btrfs/disk-io.c

+ 2 - 0
fs/btrfs/disk-io.c

@@ -1699,6 +1699,8 @@ fail:
 	kfree(tree_root);
 	bdi_destroy(&fs_info->bdi);
 	kfree(fs_info);
+	kfree(chunk_root);
+	kfree(dev_root);
 	return ERR_PTR(err);
 }