diff options
author | Claudio Saavedra <csaavedra@igalia.com> | 2019-09-06 14:43:48 +0300 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2019-09-11 09:28:41 +0000 |
commit | 2b9054e0e289f696450bdfbff6ae01b9d9fdfb4f (patch) | |
tree | e25f9a1568286d1445455542ae1f2cf74e1af1d9 | |
parent | 760bee3956c67130c10d5f60a9cc39ad37510cbf (diff) | |
download | libsoup-2b9054e0e289f696450bdfbff6ae01b9d9fdfb4f.tar.gz |
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.
-rw-r--r-- | libsoup/soup-headers.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |