[epiphany] Fix multiple leaks in ephy_uri_decode



commit 48fbb7c108edf872c48af55ba38d468cd1e51150
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Sun Jun 24 17:38:33 2018 -0500

    Fix multiple leaks in ephy_uri_decode

 lib/ephy-uri-helpers.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/lib/ephy-uri-helpers.c b/lib/ephy-uri-helpers.c
index 143210f03..021ab07ab 100644
--- a/lib/ephy-uri-helpers.c
+++ b/lib/ephy-uri-helpers.c
@@ -459,6 +459,8 @@ ephy_uri_decode (const char *uri_string)
 
     if (U_FAILURE (error)) {
       g_warning ("ICU error converting domain %s for display: %d", uri->host, error);
+      soup_uri_free (uri);
+      g_free (idna_decoded_name);
       return g_strdup (uri_string);
     }
 
@@ -466,6 +468,7 @@ ephy_uri_decode (const char *uri_string)
     g_free (uri->host);
     uri->host = evaluate_host_for_display (percent_decoded_host, idna_decoded_name);
     g_free (percent_decoded_host);
+    g_free (idna_decoded_name);
   }
 
   /* Note: this also strips passwords from the display URI. */


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