From 8a78e788b0233ba4a0d645d210c0c344f277179f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 6 Nov 2015 12:59:51 +0000 Subject: [PATCH] dshow: fix GList leak _remove_link() would not free the actual list nodes. --- sys/dshowsrcwrapper/gstdshow.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dshowsrcwrapper/gstdshow.cpp b/sys/dshowsrcwrapper/gstdshow.cpp index 29266ba..4b658a3 100644 --- a/sys/dshowsrcwrapper/gstdshow.cpp +++ b/sys/dshowsrcwrapper/gstdshow.cpp @@ -125,10 +125,8 @@ gst_dshow_new_pin_mediatype_from_streamcaps (IPin * pin, gint id, IAMStreamConfi void gst_dshow_free_pins_mediatypes (GList * pins_mediatypes) { - while (pins_mediatypes != NULL) { - gst_dshow_free_pin_mediatype (pins_mediatypes->data); - pins_mediatypes = g_list_remove_link (pins_mediatypes, pins_mediatypes); - } + g_list_free_full (pins_mediatypes, + (GDestroyNotify) gst_dshow_free_pin_mediatype); } gboolean -- 2.7.4