OSDN Git Service

avcodec: Unref the dummy buffer on the fail path
authorLuca Barbato <lu_zero@gentoo.org>
Tue, 21 Apr 2015 12:26:36 +0000 (14:26 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Wed, 22 Apr 2015 10:27:13 +0000 (12:27 +0200)
libavcodec/utils.c

index f1acd78..7740147 100644 (file)
@@ -727,6 +727,7 @@ do {                                                                    \
     ref_out = av_buffer_create(data, data_size, compat_release_buffer,  \
                                dummy_ref, 0);                           \
     if (!ref_out) {                                                     \
+        av_buffer_unref(&dummy_ref);                                    \
         av_frame_unref(frame);                                          \
         ret = AVERROR(ENOMEM);                                          \
         goto fail;                                                      \