ffmpeg | branch: master | Marvin Scholz <epira...@gmail.com> | Thu Jan 30 
00:57:25 2025 +0100| [089e69dfe49ac22c1bde8758f12aa7b692a896ab] | committer: 
Marvin Scholz

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=089e69dfe49ac22c1bde8758f12aa7b692a896ab
---

 libavfilter/f_sendcmd.c | 1 +
 1 file changed, 1 insertion(+)

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);
             }
         }

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to