[FFmpeg-cvslog] avdevice/iec61883: free packet on buffer allocation error
Marton Balint
git at videolan.org
Thu Apr 19 05:11:16 EEST 2018
ffmpeg | branch: release/3.1 | Marton Balint <cus at passwd.hu> | Wed Feb 8 23:37:42 2017 +0100| [13deb0c1f6af43c4975f12478544ef718f0a7582] | 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=13deb0c1f6af43c4975f12478544ef718f0a7582
---
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