forked from FFmpeg/FFmpeg
avdevice/iec61883: free packet on buffer allocation error
Fixes Coverity CID 1396416. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
8985e4af2b
commit
4556dad2b7
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue