mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 17:30:00 +01:00
avdevice/iec61883: free packet on buffer allocation error
Fixes Coverity CID 1396416.
Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 4556dad2b7)
This commit is contained in:
committed by
James Almer
parent
b910b34926
commit
3c056989dc
@@ -120,6 +120,7 @@ static int iec61883_callback(unsigned char *data, int length,
|
|||||||
|
|
||||||
packet->buf = av_malloc(length);
|
packet->buf = av_malloc(length);
|
||||||
if (!packet->buf) {
|
if (!packet->buf) {
|
||||||
|
av_free(packet);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user