Commit c9eac806 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/avpacket: use av_freep(), do not leave stale pointers in memory

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent b60938e4
...@@ -272,7 +272,7 @@ void av_packet_free_side_data(AVPacket *pkt) ...@@ -272,7 +272,7 @@ void av_packet_free_side_data(AVPacket *pkt)
{ {
int i; int i;
for (i = 0; i < pkt->side_data_elems; i++) for (i = 0; i < pkt->side_data_elems; i++)
av_free(pkt->side_data[i].data); av_freep(&pkt->side_data[i].data);
av_freep(&pkt->side_data); av_freep(&pkt->side_data);
pkt->side_data_elems = 0; pkt->side_data_elems = 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment