diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-07-15 09:50:49 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-22 09:14:05 +0200 |
commit | d515e9c2259dd825b167a94266efd5336a711702 (patch) | |
tree | 764980065d3183498b98188f30fbb8ba1ce446ce | |
parent | 3825b5268844694ff50a0e0bfde64df43a862fae (diff) | |
download | ffmpeg-d515e9c2259dd825b167a94266efd5336a711702.tar.gz |
vf_fps: fix a memleak on malloc failure.
-rw-r--r-- | libavfilter/vf_fps.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c index ab7cba57d1..bf140f8143 100644 --- a/libavfilter/vf_fps.c +++ b/libavfilter/vf_fps.c @@ -161,8 +161,10 @@ static int write_to_fifo(AVFifoBuffer *fifo, AVFilterBufferRef *buf) int ret; if (!av_fifo_space(fifo) && - (ret = av_fifo_realloc2(fifo, 2*av_fifo_size(fifo)))) + (ret = av_fifo_realloc2(fifo, 2*av_fifo_size(fifo)))) { + avfilter_unref_bufferp(&buf); return ret; + } av_fifo_generic_write(fifo, &buf, sizeof(buf), NULL); return 0; |