]> git.sesse.net Git - ffmpeg/commitdiff
avdevice/iec61883: free packet on buffer allocation error
authorMarton Balint <cus@passwd.hu>
Wed, 8 Feb 2017 22:37:42 +0000 (23:37 +0100)
committerMarton Balint <cus@passwd.hu>
Sun, 19 Feb 2017 15:41:43 +0000 (16:41 +0100)
Fixes Coverity CID 1396416.

Signed-off-by: Marton Balint <cus@passwd.hu>
libavdevice/iec61883.c

index c45ae9ae5cd24d06e46ddfb1c2073e6d9d5a97bd..721dca38eef99c6c2e9aba66c6edac97b5ced1aa 100644 (file)
@@ -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;
     }