aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2017-02-08 23:37:42 +0100
committerJames Almer <jamrial@gmail.com>2018-04-18 23:01:25 -0300
commit1fd992af60453e1ff4d3fd3af71a6891e5bd549d (patch)
tree79a37ba7fb0d524f72b26db0e33fd87414e25522
parent0a340924ef171711ba11eb5657fa8310b80bfdff (diff)
downloadffmpeg-1fd992af60453e1ff4d3fd3af71a6891e5bd549d.tar.gz
avdevice/iec61883: free packet on buffer allocation error
Fixes Coverity CID 1396416. Signed-off-by: Marton Balint <cus@passwd.hu> (cherry picked from commit 4556dad2b7379a527134db519ab60111abefaf10)
-rw-r--r--libavdevice/iec61883.c1
1 files changed, 1 insertions, 0 deletions
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;
}