From ec95963b1f5c5b8c5279c649aa2b177881b4d480 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 12 May 2014 17:17:07 +0200 Subject: [PATCH] videodecoder: Free data after removing it from the list While it wouldn't have caused any failures (g_list_remove doesn't dereference the provided pointer), it does make the code cleaner. CID #1212174 --- gst-libs/gst/video/gstvideodecoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index eb2d5a1174..c278e801d9 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -1660,9 +1660,9 @@ gst_video_decoder_get_timestamp_at_offset (GstVideoDecoder * *pts = ts->pts; *dts = ts->dts; *duration = ts->duration; - timestamp_free (ts); g = g->next; decoder->priv->timestamps = g_list_remove (decoder->priv->timestamps, ts); + timestamp_free (ts); } else { break; }