Mercurial > libavformat.hg
changeset 4840:d99a060db4a4 libavformat
Fix memleak in nuv demuxer: free packet already allocated packet when
returning an error in nuv_packet.
author | reimar |
---|---|
date | Thu, 09 Apr 2009 14:16:22 +0000 |
parents | bab1f7903289 |
children | 94eb88d4ac0f |
files | nuv.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/nuv.c Wed Apr 08 20:20:42 2009 +0000 +++ b/nuv.c Thu Apr 09 14:16:22 2009 +0000 @@ -226,7 +226,10 @@ 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;