1
0
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:
Michael Niedermayer 2013-08-30 20:57:55 +02:00
parent 5c504e4df7
commit 6e1b1a27a4

View File

@ -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);
}