summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2017-07-03 19:37:40 +0200
committerBastien Nocera <hadess@hadess.net>2017-07-03 19:38:56 +0200
commit2d2fc7102cf33a0b7151c0b274fd45093108b084 (patch)
tree97062d78c0961f0594557a36d9d30e0fe815bac5
parentb5971f084632732b572b87e7dc8d8759d1005fe4 (diff)
downloadtotem-pl-parser-2d2fc7102cf33a0b7151c0b274fd45093108b084.tar.gz
videosite: Fix small memory leakgnome-3-10
When checking for videosite support.
-rw-r--r--plparse/totem-pl-parser-videosite.c10
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