From 2109e33da1c155d5dbcdd80d7bd538611bac031e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 20 Apr 2008 16:32:03 +0000 Subject: [PATCH] gst/gsturi.c: Fix leak: g_strdown operates on the string in place, while g_ascii_strdown() returns a newly-allocated ... 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 | 6 ++++++ gst/gsturi.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ec0534d35f..9ad97da1b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-20 Tim-Philipp Müller + + * 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 * tools/gst-inspect.c: (print_uri_handler_info), diff --git a/gst/gsturi.c b/gst/gsturi.c index 06ff8b942a..6890a8bae7 100644 --- a/gst/gsturi.c +++ b/gst/gsturi.c @@ -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); } /**