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:
3f388b9
)
Fix segmentation fault when opening invalid file system
author
Hubert Kario
<kario@wit.edu.pl>
Sun, 19 Feb 2012 20:11:46 +0000
(21:11 +0100)
committer
Chris Mason
<chris.mason@fusionio.com>
Tue, 3 Jul 2012 20:27:46 +0000
(16:27 -0400)
Signed-off-by: Hubert Kario <kario@wit.edu.pl>
btrfslabel.c
patch
|
blob
|
history
diff --git
a/btrfslabel.c
b/btrfslabel.c
index
da694e1
..
bf73802
100644
(file)
--- a/
btrfslabel.c
+++ b/
btrfslabel.c
@@
-55,6
+55,8
@@
static void change_label_unmounted(char *dev, char *nLabel)
* and as read-write.
*/
root = open_ctree(dev, 0, 1);
+ if (!root) /* errors are printed by open_ctree() */
+ return;
trans = btrfs_start_transaction(root, 1);
strncpy(root->fs_info->super_copy.label, nLabel, BTRFS_LABEL_SIZE);