projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fc2413
)
btrfs-progs: don't free null path
author
Zach Brown
<zab@redhat.com>
Tue, 22 Jan 2013 00:34:03 +0000
(16:34 -0800)
committer
Zach Brown
<zab@redhat.com>
Wed, 6 Feb 2013 00:09:39 +0000
(16:09 -0800)
btrfs_free_path() derefs the path before freeing it. It can't be passed
a null pointer when allocation fails.
Signed-off-by: Zach Brown <zab@redhat.com>
restore.c
patch
|
blob
|
history
diff --git
a/restore.c
b/restore.c
index
4853203
..
3fa8769
100644
(file)
--- a/
restore.c
+++ b/
restore.c
@@
-710,7
+710,7
@@
static int find_first_dir(struct btrfs_root *root, u64 *objectid)
path = btrfs_alloc_path();
if (!path) {
fprintf(stderr, "Ran out of memory\n");
-
goto ou
t;
+
return re
t;
}
ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);