diff mbox series

[FFmpeg-devel,3/3] avfilter/src_movie: Fix leak of packet upon error

Message ID 20200910013941.14444-3-andreas.rheinhardt@gmail.com
State Accepted
Commit d91756c1b5fa70095e55d34ded6d6085bfd56bd4
Headers show
Series [FFmpeg-devel,1/3] avfilter/src_movie: Remove unneeded resetting of AVPacket | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 10, 2020, 1:39 a.m. UTC
If allocating the AVFrame to contain a decoded frame fails, the AVPacket
containing the data intended to be decoded leaks. This commit fixes
this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavfilter/src_movie.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c
index 75ac3bfaf6..d83cb6d1e4 100644
--- a/libavfilter/src_movie.c
+++ b/libavfilter/src_movie.c
@@ -344,6 +344,7 @@  static av_cold void movie_uninit(AVFilterContext *ctx)
     }
     av_freep(&movie->st);
     av_freep(&movie->out_index);
+    av_packet_unref(&movie->pkt);
     if (movie->format_ctx)
         avformat_close_input(&movie->format_ctx);
 }