From 6d94909c08df6d5e7fffa9bde897d05833209f33 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 1 Aug 2025 09:05:51 +0000 Subject: [PATCH] Do not leak on failure, GitHub 4565. --- cmd-if-shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd-if-shell.c b/cmd-if-shell.c index 81518939..f0c3637c 100644 --- a/cmd-if-shell.c +++ b/cmd-if-shell.c @@ -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);