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 22:59:26 -0300
commit13deb0c1f6af43c4975f12478544ef718f0a7582 (patch)
tree237fd55bc728dca6cc4fe52bed8392f69893a7c0
parentda113226410403a65833a6c1b83ea6977ffccdb3 (diff)
downloadffmpeg-13deb0c1f6af43c4975f12478544ef718f0a7582.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;
}