summaryrefslogtreecommitdiff
path: root/sys/dshowsrcwrapper
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2015-11-06 12:59:51 +0000
committerTim-Philipp Müller <tim@centricular.com>2015-11-06 13:00:55 +0000
commit8a78e788b0233ba4a0d645d210c0c344f277179f (patch)
tree37ecae900c656bfc79ec65c198d0f9e4e484501a /sys/dshowsrcwrapper
parentedab4deb3a3eed7fd93b745aa9708eea5dd86572 (diff)
downloadgstreamer-plugins-bad-8a78e788b0233ba4a0d645d210c0c344f277179f.tar.gz
dshow: fix GList leak
_remove_link() would not free the actual list nodes.
Diffstat (limited to 'sys/dshowsrcwrapper')
-rw-r--r--sys/dshowsrcwrapper/gstdshow.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dshowsrcwrapper/gstdshow.cpp b/sys/dshowsrcwrapper/gstdshow.cpp
index 29266bae6..4b658a349 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