mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user