avcodec/avpacket: use av_freep(), do not leave stale pointers in memory
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 7 Oct 2014 01:40:57 +0000 (03:40 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 7 Oct 2014 01:40:57 +0000 (03:40 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/avpacket.c

index 9978712..3c26046 100644 (file)
@@ -272,7 +272,7 @@ void av_packet_free_side_data(AVPacket *pkt)
 {
     int 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);
     pkt->side_data_elems = 0;
 }