avcodec/vp9_superframe_split: fix memory leak in case of output packet creation failure
Some function calls may fail after the output packet is initialized. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
72bb955625
commit
7e0dc7210b
1 changed files with 2 additions and 0 deletions
|
|
@ -126,6 +126,8 @@ static int vp9_superframe_split_filter(AVBSFContext *ctx, AVPacket *out)
|
|||
|
||||
return 0;
|
||||
fail:
|
||||
if (ret < 0)
|
||||
av_packet_unref(out);
|
||||
av_packet_unref(&s->buffer_pkt);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue