changeset 3415:89f651b6f12a libavformat

matroskadec: avoid potential mem leak fix CID120
author aurel
date Mon, 02 Jun 2008 23:27:14 +0000
parents 703f452f00f1
children f386245ae6f7
files matroskadec.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/matroskadec.c	Mon Jun 02 23:07:41 2008 +0000
+++ b/matroskadec.c	Mon Jun 02 23:27:14 2008 +0000
@@ -2962,6 +2962,7 @@
                 pkt = av_mallocz(sizeof(AVPacket));
                 /* XXX: prevent data copy... */
                 if (av_new_packet(pkt, pkt_size+offset) < 0) {
+                    av_free(pkt);
                     res = AVERROR(ENOMEM);
                     n = laces-1;
                     break;