From: Aki Tuomi Date: Fri, 25 Nov 2022 13:06:27 +0000 (+0200) Subject: lib-dns: Assign client to context X-Git-Tag: 2.4.0~3375 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09b5e715ada13e18c2aa6dfc07de87b5908e711f;p=thirdparty%2Fdovecot%2Fcore.git lib-dns: Assign client to context Fixes signal 11 crash when background cache refresh fails, forgotten in 47f44374201e83ade6204bb237b163fbd066134a --- diff --git a/src/lib-dns/dns-lookup.c b/src/lib-dns/dns-lookup.c index 393015f212..09504fb3e4 100644 --- a/src/lib-dns/dns-lookup.c +++ b/src/lib-dns/dns-lookup.c @@ -170,6 +170,7 @@ static void dns_client_cache_entry_refresh(struct dns_client *client, i_unreached(); ctx = i_new(struct dns_cache_lookup, 1); ctx->key = i_strdup(entry->cache_key); + ctx->client = client; if (dns_client_lookup_ptr(client, &ip, client->conn.event, dns_client_cache_callback, ctx, &lookup) < 0) { @@ -185,6 +186,7 @@ static void dns_client_cache_entry_refresh(struct dns_client *client, } else if (*entry->cache_key == 'N') { ctx = i_new(struct dns_cache_lookup, 1); ctx->key = i_strdup(entry->cache_key); + ctx->client = client; if (dns_client_lookup(client, entry->cache_key + 1, client->conn.event, dns_client_cache_callback,