changeset 3590:b22fa30c033e libavformat

Fix a mem leak in av_find_stream_info(). Patch by Erik Hovland erik hovland org
author benoit
date Fri, 18 Jul 2008 07:13:56 +0000
parents f306b45cab7e
children aa6e8ff72d9e
files utils.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Fri Jul 18 01:07:17 2008 +0000
+++ b/utils.c	Fri Jul 18 07:13:56 2008 +0000
@@ -2020,8 +2020,10 @@
         }
 
         pkt= add_to_pktbuf(&ic->packet_buffer, &pkt1);
-        if(av_dup_packet(pkt) < 0)
+        if(av_dup_packet(pkt) < 0) {
+            av_free(duration_error);
             return AVERROR(ENOMEM);
+        }
 
         read_size += pkt->size;