gst/gsturi.c: Fix leak: g_strdown operates on the string in place, while g_ascii_strd...
authorTim-Philipp Müller <tim@centricular.net>
Sun, 20 Apr 2008 16:32:03 +0000 (16:32 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Sun, 20 Apr 2008 16:32:03 +0000 (16:32 +0000)
Original commit message from CVS:
* gst/gsturi.c: (gst_uri_get_protocol):
Fix leak: g_strdown operates on the string in place, while
g_ascii_strdown() returns a newly-allocated string.

ChangeLog
gst/gsturi.c

index ec0534d..9ad97da 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-20  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * gst/gsturi.c: (gst_uri_get_protocol):
+         Fix leak: g_strdown operates on the string in place, while
+         g_ascii_strdown() returns a newly-allocated string.
+
 2008-04-20  Sebastian Dröge  <slomo@circular-chaos.org>
 
        * tools/gst-inspect.c: (print_uri_handler_info),
index 06ff8b9..6890a8b 100644 (file)
@@ -371,7 +371,7 @@ gst_uri_get_protocol (const gchar * uri)
 
   colon = strstr (uri, "://");
 
-  return g_ascii_strdown (g_strndup (uri, colon - uri), -1);
+  return g_ascii_strdown (uri, colon - uri);
 }
 
 /**