summaryrefslogtreecommitdiff
path: root/sys/directsound/gstdirectsoundsrc.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@hotmail.com>2014-08-09 13:22:42 +0200
committerTim-Philipp Müller <tim@centricular.com>2014-08-10 12:16:08 +0100
commit6d151843ef7dbd2d9f4f4bb05eaa22f731c29168 (patch)
treed220c0642baaddf04c0458d43ddce682630c6d8d /sys/directsound/gstdirectsoundsrc.c
parentb323fba934b2dc855bc7226594ed8268022f4cef (diff)
downloadgstreamer-plugins-bad-6d151843ef7dbd2d9f4f4bb05eaa22f731c29168.tar.gz
directsoundsrc: Avoid leaking copy of caps object
gst_pad_get_pad_template_caps() returns a reference which is unreferenced, so creating a copy using gst_caps_copy() results in a reference leak. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734536
Diffstat (limited to 'sys/directsound/gstdirectsoundsrc.c')
-rw-r--r--sys/directsound/gstdirectsoundsrc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/directsound/gstdirectsoundsrc.c b/sys/directsound/gstdirectsoundsrc.c
index 11063ca99..420a70d57 100644
--- a/sys/directsound/gstdirectsoundsrc.c
+++ b/sys/directsound/gstdirectsoundsrc.c
@@ -201,8 +201,7 @@ gst_directsound_src_getcaps (GstBaseSrc * bsrc, GstCaps * filter)
GstCaps *caps = NULL;
GST_DEBUG_OBJECT (bsrc, "get caps");
- caps = gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_SRC_PAD
- (bsrc)));
+ caps = gst_pad_get_pad_template_caps (GST_BASE_SRC_PAD (bsrc));
return caps;
}