Do not leak on failure, GitHub 4565.

This commit is contained in:
nicm
2025-08-01 09:05:51 +00:00
parent 4f38af01e0
commit 6d94909c08

View File

@ -124,7 +124,7 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item)
-1) == NULL) {
cmdq_error(item, "failed to run command: %s", shellcmd);
free(shellcmd);
free(cdata);
cmd_if_shell_free(cdata);
return (CMD_RETURN_ERROR);
}
free(shellcmd);