[FFmpeg-cvslog] avdevice/iec61883: free packet on buffer allocation error

Marton Balint git at videolan.org
Thu Apr 19 05:11:09 EEST 2018


ffmpeg | branch: release/3.0 | Marton Balint <cus at passwd.hu> | Wed Feb  8 23:37:42 2017 +0100| [3c056989dc57c973bc63a6c85516955986c5fdcf] | committer: James Almer

avdevice/iec61883: free packet on buffer allocation error

Fixes Coverity CID 1396416.

Signed-off-by: Marton Balint <cus at passwd.hu>
(cherry picked from commit 4556dad2b7379a527134db519ab60111abefaf10)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3c056989dc57c973bc63a6c85516955986c5fdcf
---

 libavdevice/iec61883.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavdevice/iec61883.c b/libavdevice/iec61883.c
index c45ae9ae5c..721dca38ee 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;
     }



More information about the ffmpeg-cvslog mailing list