]> git.sesse.net Git - ffmpeg/commitdiff
buffersrc: Fix resource leak on error
authorFederico Tomassetti <federico@tomassetti.me>
Mon, 23 Feb 2015 17:55:53 +0000 (17:55 +0000)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Sun, 19 Apr 2015 22:50:46 +0000 (23:50 +0100)
Bug-Id: CID 1267902
CC: libav-stable@libav.org
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
libavfilter/buffersrc.c

index 00e28f8fd33e7858fddb11f2e82b0055f476f82c..f7680633091acd724d56b16d124e6dd3b2c454e1 100644 (file)
@@ -195,6 +195,7 @@ do {                                                                    \
     ref_out = av_buffer_create(data, data_size, compat_unref_buffer,    \
                                dummy_ref, 0);                           \
     if (!ref_out) {                                                     \
+        av_freep(&dummy_ref);                                           \
         av_frame_unref(frame);                                          \
         ret = AVERROR(ENOMEM);                                          \
         goto fail;                                                      \