diff --git a/lib/misc/lvm-exec.c b/lib/misc/lvm-exec.c index e4145242b..a3a629bf1 100644 --- a/lib/misc/lvm-exec.c +++ b/lib/misc/lvm-exec.c @@ -53,14 +53,14 @@ int exec_cmd(struct cmd_context *cmd, const char *const argv[], int status; char buf[PATH_MAX * 2]; + if (rstatus) + *rstatus = -1; + if (!argv[0]) { log_error(INTERNAL_ERROR "Missing command."); return 0; } - if (rstatus) - *rstatus = -1; - if (sync_needed) /* Flush ops and reset dm cookie */ if (!sync_local_dev_names(cmd)) {