OSDN Git Service

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 00e28f8..f768063 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;                                                      \