From a44058c12e8342dbfd04d70d646878baaa850f08 Mon Sep 17 00:00:00 2001 From: Sreerenj Balachandran Date: Fri, 22 Jun 2012 11:51:04 +0300 Subject: [PATCH] videoutils: Use g_list_free_full instead of g_list_foreach and g_list_free --- gst-libs/gst/video/gstvideoutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/video/gstvideoutils.c b/gst-libs/gst/video/gstvideoutils.c index 91e5b96..001e511 100644 --- a/gst-libs/gst/video/gstvideoutils.c +++ b/gst-libs/gst/video/gstvideoutils.c @@ -46,8 +46,8 @@ _gst_video_codec_frame_free (GstVideoCodecFrame * frame) gst_buffer_unref (frame->output_buffer); } - g_list_foreach (frame->events, (GFunc) gst_event_unref, NULL); - g_list_free (frame->events); + g_list_free_full (frame->events, (GDestroyNotify) gst_event_unref); + frame->events = NULL; if (frame->user_data_destroy_notify) frame->user_data_destroy_notify (frame->user_data); -- 2.7.4