[totem-pl-parser/gnome-3-10] videosite: Fix small memory leak
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser/gnome-3-10] videosite: Fix small memory leak
- Date: Mon, 3 Jul 2017 17:41:11 +0000 (UTC)
commit 2d2fc7102cf33a0b7151c0b274fd45093108b084
Author: Bastien Nocera <hadess hadess net>
Date: Mon Jul 3 19:37:40 2017 +0200
videosite: Fix small memory leak
When checking for videosite support.
plparse/totem-pl-parser-videosite.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/plparse/totem-pl-parser-videosite.c b/plparse/totem-pl-parser-videosite.c
index 61d4597..6cb3dc5 100644
--- a/plparse/totem-pl-parser-videosite.c
+++ b/plparse/totem-pl-parser-videosite.c
@@ -80,12 +80,13 @@ totem_pl_parser_is_videosite (const char *uri, gboolean debug)
};
char *out;
char *script;
+ gboolean ret = FALSE;
script = find_helper_script ();
if (script == NULL) {
if (debug)
g_print ("Did not find a script to check whether '%s' is a videosite\n", uri);
- return FALSE;
+ return ret;
}
args[0] = script;
@@ -100,13 +101,16 @@ totem_pl_parser_is_videosite (const char *uri, gboolean debug)
NULL,
NULL,
NULL);
+
+ ret = g_strcmp0 (out, "TRUE") == 0;
if (debug)
g_print ("Checking videosite with script '%s' for URI '%s' returned '%s' (%s)\n",
- script, uri, out, g_strcmp0 (out, "TRUE") == 0 ? "true" : "false");
+ script, uri, out, ret ? "true" : "false");
g_free (script);
+ g_free (out);
- return (g_strcmp0 (out, "TRUE") == 0);
+ return ret;
}
#ifndef TOTEM_PL_PARSER_MINI
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]