[FFmpeg-cvslog] r18385 - trunk/libavformat/nuv.c
reimar
subversion
Thu Apr 9 16:16:23 CEST 2009
Author: reimar
Date: Thu Apr 9 16:16:22 2009
New Revision: 18385
Log:
Fix memleak in nuv demuxer: free packet already allocated packet when
returning an error in nuv_packet.
Modified:
trunk/libavformat/nuv.c
Modified: trunk/libavformat/nuv.c
==============================================================================
--- trunk/libavformat/nuv.c Thu Apr 9 13:54:13 2009 (r18384)
+++ trunk/libavformat/nuv.c Thu Apr 9 16:16:22 2009 (r18385)
@@ -226,7 +226,10 @@ static int nuv_packet(AVFormatContext *s
pkt->stream_index = ctx->v_id;
memcpy(pkt->data, hdr, copyhdrsize);
ret = get_buffer(pb, pkt->data + copyhdrsize, size);
- if (ret < 0) return ret;
+ if (ret < 0) {
+ av_free_packet(pkt);
+ return ret;
+ }
if (ret < size)
av_shrink_packet(pkt, copyhdrsize + ret);
return 0;
More information about the ffmpeg-cvslog
mailing list