summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd-queue.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd-queue.c b/cmd-queue.c
index 7b2675fa..c0fc26c6 100644
--- a/cmd-queue.c
+++ b/cmd-queue.c
@@ -199,6 +199,8 @@ cmdq_continue_one(struct cmd_q *cmdq)
if (cmd_prepare_state(cmd, cmdq) != 0)
goto error;
retval = cmd->entry->exec(cmd, cmdq);
+ if (retval == CMD_RETURN_ERROR)
+ goto error;
cmdq_guard(cmdq, "end", flags);
return (retval);