From 6c1278d35c97a5be11f35dcb812a1c7f303f1ebe Mon Sep 17 00:00:00 2001 From: Zaheer Abbas Merali Date: Tue, 12 Feb 2008 21:31:57 +0000 Subject: sys/dvb/dvbbasebin.c: Fix leak of location string returned from gst_uri_get_location. Original commit message from CVS: * sys/dvb/dvbbasebin.c: Fix leak of location string returned from gst_uri_get_location. Fixes bug #516114 --- sys/dvb/dvbbasebin.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sys/dvb') diff --git a/sys/dvb/dvbbasebin.c b/sys/dvb/dvbbasebin.c index bc13eddb..e10adab3 100644 --- a/sys/dvb/dvbbasebin.c +++ b/sys/dvb/dvbbasebin.c @@ -992,8 +992,13 @@ dvb_base_bin_uri_set_uri (GstURIHandler * handler, const gchar * uri) if (strcmp (protocol, "dvb") != 0) { ret = FALSE; } else { - ret = set_properties_for_channel (G_OBJECT (dvbbasebin), - gst_uri_get_location (uri)); + gchar *location = gst_uri_get_location (uri); + + if (location != NULL) { + ret = set_properties_for_channel (G_OBJECT (dvbbasebin), location); + g_free (location); + } else + ret = FALSE; } /* here is where we parse channels.conf */ -- cgit v1.2.1