Error out cmd_start_replace() if canonicalize_path() dstdev failed, add
the missing "goto leave_with_error;"
Signed-off-by: Eryu Guan <guaneryu@xxxxxxxxx>
---
cmds-replace.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmds-replace.c b/cmds-replace.c
index 51b7aaf..d5648d5 100644
--- a/cmds-replace.c
+++ b/cmds-replace.c
@@ -213,6 +213,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)) {
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html