btrfs-progs: return error when canonicalize_path failed
authorEryu Guan <guaneryu@gmail.com>
Wed, 8 Oct 2014 09:42:29 +0000 (17:42 +0800)
committerDavid Sterba <dsterba@suse.cz>
Fri, 10 Oct 2014 08:51:57 +0000 (10:51 +0200)
Error out cmd_start_replace() if canonicalize_path() dstdev failed, add
the missing "goto leave_with_error;"

Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-replace.c

index 9fe7ad8..4a4e865 100644 (file)
@@ -214,6 +214,7 @@ static int cmd_start_replace(int argc, char **argv)
                fprintf(stderr,
                        "ERROR: Could not canonicalize path '%s': %s\n",
                        argv[optind + 1], strerror(errno));
+               goto leave_with_error;
        }
 
        if (is_numerical(srcdev)) {