diff options
author | Bastien Nocera <hadess@hadess.net> | 2017-07-03 19:37:40 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2017-07-03 19:38:56 +0200 |
commit | 2d2fc7102cf33a0b7151c0b274fd45093108b084 (patch) | |
tree | 97062d78c0961f0594557a36d9d30e0fe815bac5 | |
parent | b5971f084632732b572b87e7dc8d8759d1005fe4 (diff) | |
download | totem-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.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 |