Updating branch refs/heads/master
         to 26f18779a394eaee43bf18b086ddb46f2fff6d01 (commit)
       from 2ee3da04aaaea65cd2ca72e87a73e3df94805880 (commit)

commit 26f18779a394eaee43bf18b086ddb46f2fff6d01
Author: PaweĊ‚ Forysiuk <tuxa...@o2.pl>
Date:   Thu Mar 7 18:13:25 2013 +0100

    Don't free path before use in midori_browser_get_docs

 midori/midori-browser.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 9bfa039..5c79e4e 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -4721,15 +4721,18 @@ midori_browser_get_docs (gboolean error)
     #ifdef G_OS_WIN32
     gchar* path = midori_paths_get_data_filename ("doc/midori/faq.html", 
FALSE);
     gboolean found = (g_access (path, F_OK) == 0);
-    g_free (path);
     if (found)
-        return g_filename_to_uri (path, NULL, NULL);
+    {
+        gchar* uri = g_filename_to_uri (path, NULL, NULL);
+        g_free (path);
+        return uri;
+    }
+    g_free (path);
     #else
     if (g_access (DOCDIR "/faq.html", F_OK) == 0)
         return g_strdup ("file://" DOCDIR "/faq.html");
     #endif
-    else
-        return error ? g_strdup ("about:nodocs") : NULL;
+    return error ? g_strdup ("about:nodocs") : NULL;
 }
 
 static void
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to