Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-23 17:35:07 +0300
committerMichael Niedermayer <michaelni@gmx.at>2014-12-23 17:35:07 +0300
commitf7f4a901748c0a1f320f5170a96cdc72bb48e00c (patch)
treed495301f029bec6b9d05c511dbe62feb374e4d1d /libavformat/rtpdec.c
parentbb858e67e50aee2811b697d2b3d88127dbada26f (diff)
avformat/rtpdec: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpdec.c')
-rw-r--r--libavformat/rtpdec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index 33205aa6d4..28a926f8f9 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -666,8 +666,8 @@ void ff_rtp_reset_packet_queue(RTPDemuxContext *s)
{
while (s->queue) {
RTPPacket *next = s->queue->next;
- av_free(s->queue->buf);
- av_free(s->queue);
+ av_freep(&s->queue->buf);
+ av_freep(&s->queue);
s->queue = next;
}
s->seq = 0;
@@ -725,8 +725,8 @@ static int rtp_parse_queued_packet(RTPDemuxContext *s, AVPacket *pkt)
/* Parse the first packet in the queue, and dequeue it */
rv = rtp_parse_packet_internal(s, pkt, s->queue->buf, s->queue->len);
next = s->queue->next;
- av_free(s->queue->buf);
- av_free(s->queue);
+ av_freep(&s->queue->buf);
+ av_freep(&s->queue);
s->queue = next;
s->queue_len--;
return rv;