[libsoup/wip/fuzzing] Fix leak found by fuzzing



commit be442c61d52139e952fb981717db902aa63b24ea
Author: Patrick Griffis <pgriffis igalia com>
Date:   Wed Dec 16 10:12:23 2020 -0600

    Fix leak found by fuzzing

 libsoup/soup-uri-utils.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/libsoup/soup-uri-utils.c b/libsoup/soup-uri-utils.c
index a39bb24d..96807628 100644
--- a/libsoup/soup-uri-utils.c
+++ b/libsoup/soup-uri-utils.c
@@ -311,8 +311,10 @@ soup_uri_decode_data_uri (const char *uri,
         if (!soup_uri)
                 return NULL;
 
-        if (g_strcmp0 (g_uri_get_scheme (soup_uri), "data") || g_uri_get_host (soup_uri) != NULL)
+        if (g_strcmp0 (g_uri_get_scheme (soup_uri), "data") || g_uri_get_host (soup_uri) != NULL) {
+                g_uri_unref (soup_uri);
                 return NULL;
+        }
 
         if (content_type)
                 *content_type = NULL;


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