From: Marton Balint Date: Wed, 8 Feb 2017 22:37:42 +0000 (+0100) Subject: avdevice/iec61883: free packet on buffer allocation error X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=4556dad2b7379a527134db519ab60111abefaf10;p=ffmpeg avdevice/iec61883: free packet on buffer allocation error Fixes Coverity CID 1396416. Signed-off-by: Marton Balint --- diff --git a/libavdevice/iec61883.c b/libavdevice/iec61883.c index c45ae9ae5cd..721dca38eef 100644 --- a/libavdevice/iec61883.c +++ b/libavdevice/iec61883.c @@ -120,6 +120,7 @@ static int iec61883_callback(unsigned char *data, int length, packet->buf = av_malloc(length); if (!packet->buf) { + av_free(packet); ret = -1; goto exit; }