From d601190a7df193ecf37a445fbb5a9a0999f28b21 Mon Sep 17 00:00:00 2001 From: Eryu Guan Date: Wed, 8 Oct 2014 17:42:29 +0800 Subject: btrfs-progs: return error when canonicalize_path failed Error out cmd_start_replace() if canonicalize_path() dstdev failed, add the missing "goto leave_with_error;" Signed-off-by: Eryu Guan Signed-off-by: David Sterba --- cmds-replace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmds-replace.c b/cmds-replace.c index 9fe7ad85..4a4e8658 100644 --- a/cmds-replace.c +++ b/cmds-replace.c @@ -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)) { -- cgit v1.2.3