diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c index fc21a88bf4..304658ae3d 100644 --- a/libavfilter/f_sendcmd.c +++ b/libavfilter/f_sendcmd.c @@ -257,6 +257,7 @@ static int parse_commands(Command **cmds, int *nb_cmds, int interval_count, if (!*cmds) { av_log(log_ctx, AV_LOG_ERROR, "Could not (re)allocate command array\n"); + clear_command(&cmd); return AVERROR(ENOMEM); } }