mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avcodec/avpacket: Use av_free_packet() in error cleanups
This prevents memleaks on errors reproduceable with fate when error pathes are forced Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
5c504e4df7
commit
6e1b1a27a4
@ -215,7 +215,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
return 0;
|
||||
|
||||
failed_alloc:
|
||||
av_destruct_packet(pkt);
|
||||
av_free_packet(pkt);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
@ -237,7 +237,7 @@ int av_copy_packet_side_data(AVPacket *pkt, AVPacket *src)
|
||||
return 0;
|
||||
|
||||
failed_alloc:
|
||||
av_destruct_packet(pkt);
|
||||
av_free_packet(pkt);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user