diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index 1cef1d6a10..c4b7af4262 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -242,6 +242,7 @@ do { \ ref_out = av_buffer_create(data, data_size, compat_unref_buffer, \ dummy_ref, (buf->perms & AV_PERM_WRITE) ? 0 : AV_BUFFER_FLAG_READONLY); \ if (!ref_out) { \ + av_freep(&dummy_ref); \ av_frame_unref(frame); \ ret = AVERROR(ENOMEM); \ goto fail; \