diff mbox

[2/2] btrfs-progs: return error when canonicalize_path failed

Message ID 1412761349-32721-2-git-send-email-guaneryu@gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Eryu Guan Oct. 8, 2014, 9:42 a.m. UTC
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>
---
 cmds-replace.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

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)) {