[libsoup/leaks: 3/3] soup-headers: fix a leak in the strict parsing code
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/leaks: 3/3] soup-headers: fix a leak in the strict parsing code
- Date: Fri, 6 Sep 2019 11:54:27 +0000 (UTC)
commit e987639383e06d2931d3039816ddfe7b6d8bfa80
Author: Claudio Saavedra <csaavedra igalia com>
Date: Fri Sep 6 14:43:48 2019 +0300
soup-headers: fix a leak in the strict parsing code
Once we bail out we are not going to add the rest of the items to the
hash table, so we need to manually delete them, otherwise they leak.
libsoup/soup-headers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libsoup/soup-headers.c b/libsoup/soup-headers.c
index 18ded840..5e70b97b 100644
--- a/libsoup/soup-headers.c
+++ b/libsoup/soup-headers.c
@@ -756,7 +756,7 @@ parse_param_list (const char *header, char delim, gboolean strict)
if (strict && duplicated) {
soup_header_free_param_list (params);
params = NULL;
- g_free (item);
+ g_slist_foreach (iter, (GFunc)g_free, NULL);
break;
} else if (override || !duplicated)
g_hash_table_replace (params, item, value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]