Skip to content

Commit

Permalink
avdevice/iec61883: free packet on buffer allocation error
Browse files Browse the repository at this point in the history
Fixes Coverity CID 1396416.

Signed-off-by: Marton Balint <[email protected]>
  • Loading branch information
cus committed Feb 19, 2017
1 parent 8985e4a commit 4556dad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libavdevice/iec61883.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4556dad

Please sign in to comment.