[Xfce4-commits] <midori:master> Properly free scheme in sokoke_default_for_uri

Christian Dywan noreply at xfce.org
Sat Dec 15 21:52:01 CET 2012


Updating branch refs/heads/master
         to 01ce6458249453bb47705ca59439437025e4a6a5 (commit)
       from ff6ebc430b9208940682acf6850743e10faa484c (commit)

commit 01ce6458249453bb47705ca59439437025e4a6a5
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat Dec 15 21:50:12 2012 +0100

    Properly free scheme in sokoke_default_for_uri

 midori/sokoke.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/midori/sokoke.c b/midori/sokoke.c
index 3dc0f3c..bb62ac1 100644
--- a/midori/sokoke.c
+++ b/midori/sokoke.c
@@ -152,8 +152,6 @@ sokoke_default_for_uri (const gchar* uri,
     GAppInfo* info;
 
     scheme = g_uri_parse_scheme (uri);
-    if (scheme_ptr != NULL)
-        *scheme_ptr = scheme;
     if (!scheme)
         return NULL;
 
@@ -166,7 +164,9 @@ sokoke_default_for_uri (const gchar* uri,
         g_free (type);
     }
     #endif
-    if (info != NULL && scheme_ptr != NULL)
+    if (scheme_ptr != NULL)
+        *scheme_ptr = scheme;
+    else
         g_free (scheme);
     return info;
 


More information about the Xfce4-commits mailing list