[grilo-plugins] local-metadata: fix leak in string cleanup
- From: Victor Toso de Carvalho <victortoso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] local-metadata: fix leak in string cleanup
- Date: Mon, 2 Mar 2015 17:26:16 +0000 (UTC)
commit fec4c087b87f63f27c534c3135455289e74b4e23
Author: Victor Toso <me victortoso com>
Date: Mon Mar 2 17:12:58 2015 +0100
local-metadata: fix leak in string cleanup
g_regex_replace_literal() returns a newly allocated string which is not
freed. Return this string instead of allocating a new one.
src/local-metadata/grl-local-metadata.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/local-metadata/grl-local-metadata.c b/src/local-metadata/grl-local-metadata.c
index 5af7eb5..c9799d5 100644
--- a/src/local-metadata/grl-local-metadata.c
+++ b/src/local-metadata/grl-local-metadata.c
@@ -288,7 +288,7 @@ video_sanitise_string (const gchar *str)
line = g_regex_replace_literal(regex, line, -1, 0, ".", 0, NULL);
g_regex_unref(regex);
- return g_strdup (line);
+ return line;
}
/* tidies strings before we run them through the regexes */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]