diff options
author | Marvin Scholz <epirat07@gmail.com> | 2025-01-30 00:57:25 +0100 |
---|---|---|
committer | Marvin Scholz <epirat07@gmail.com> | 2025-06-11 19:26:22 +0200 |
commit | 089e69dfe49ac22c1bde8758f12aa7b692a896ab (patch) | |
tree | 38a633429d6d1be100c86e351cd6c22c99bad36d | |
parent | 2c3ac6e0faab98651085bbda825130c4b98ee615 (diff) | |
download | ffmpeg-089e69dfe49ac22c1bde8758f12aa7b692a896ab.tar.gz |
lavfi/f_sendcmd: clear Command on alloc failure
If the command array failed to allocate, the current parsed
Command has to be cleared, else memory allocated for it
would be leaked.
Fix CID 1638635
-rw-r--r-- | libavfilter/f_sendcmd.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); } } |