[gnome-builder] uri: fix obvious use-after-free



commit 3a6c1a694b8573dc09b1f5d64760d63dc8bb0e57
Author: Christian Hergert <christian hergert me>
Date:   Mon Apr 18 18:58:34 2016 -0700

    uri: fix obvious use-after-free

 libide/ide-uri.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libide/ide-uri.c b/libide/ide-uri.c
index ea951eb..6106370 100644
--- a/libide/ide-uri.c
+++ b/libide/ide-uri.c
@@ -430,10 +430,10 @@ parse_host (const gchar       *raw_host,
 
   if (flags & IDE_URI_PARSE_NO_IRI)
     {
-      g_free (decoded);
       g_set_error (error, IDE_URI_ERROR, IDE_URI_ERROR_BAD_HOST,
                    _("Non-ASCII hostname '%s' forbidden in this URI"),
                    decoded);
+      g_free (decoded);
       return FALSE;
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]