comparison matroskadec.c @ 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
comparison
equal deleted inserted replaced
3414:703f452f00f1 3415:89f651b6f12a
2960 } 2960 }
2961 2961
2962 pkt = av_mallocz(sizeof(AVPacket)); 2962 pkt = av_mallocz(sizeof(AVPacket));
2963 /* XXX: prevent data copy... */ 2963 /* XXX: prevent data copy... */
2964 if (av_new_packet(pkt, pkt_size+offset) < 0) { 2964 if (av_new_packet(pkt, pkt_size+offset) < 0) {
2965 av_free(pkt);
2965 res = AVERROR(ENOMEM); 2966 res = AVERROR(ENOMEM);
2966 n = laces-1; 2967 n = laces-1;
2967 break; 2968 break;
2968 } 2969 }
2969 if (offset) 2970 if (offset)