From 6e0240802160634b01f85ab8a511771cd86cceb8 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 8 Sep 2022 09:47:45 -0400 Subject: PR28284 cont'd, ->winning_headers reset at start of new query Mark noted we need to ditch the last client ->winning_headers along with the last ->url. Signed-off-by: Frank Ch. Eigler --- debuginfod/ChangeLog | 5 +++++ debuginfod/debuginfod-client.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index 77136698..680720ff 100644 --- a/debuginfod/ChangeLog +++ b/debuginfod/ChangeLog @@ -1,3 +1,8 @@ +2022-09-08 Frank Ch. Eigler + + * debuginfod-client.c (debuginfod_query_server): Clear + ->winning_headers along with ->url at the start of any new query. + 2022-09-08 Martin Liska * debuginfod-client.c (debuginfod_get_headers): Add to DUMMY_LIBDEBUGINFOD. diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c index 272a6a7a..5e5c140a 100644 --- a/debuginfod/debuginfod-client.c +++ b/debuginfod/debuginfod-client.c @@ -588,9 +588,11 @@ debuginfod_query_server (debuginfod_client *c, goto out; } - /* Clear the obsolete URL from a previous _find operation. */ + /* Clear the obsolete data from a previous _find operation. */ free (c->url); c->url = NULL; + free (c->winning_headers); + c->winning_headers = NULL; /* PR 27982: Add max size if DEBUGINFOD_MAXSIZE is set. */ long maxsize = 0; -- cgit v1.2.1