From: Aram Sargsyan Date: Tue, 3 Jan 2023 13:21:34 +0000 (+0000) Subject: Fix a shutdown bug in update_rpz_cb() X-Git-Tag: v9.19.9~50^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=975d16230b5831532ec66769b60657c86882a244;p=thirdparty%2Fbind9.git Fix a shutdown bug in update_rpz_cb() When shutting down, the cleanup path should not try to destroy 'newnodes', because it is NULL at that point. Introduce another label for the "shuttingdown" scenario. --- diff --git a/lib/dns/rpz.c b/lib/dns/rpz.c index efe04b79e32..bb9a7ba8514 100644 --- a/lib/dns/rpz.c +++ b/lib/dns/rpz.c @@ -1911,7 +1911,7 @@ update_rpz_cb(void *data) { result = dns__rpz_shuttingdown(rpz->rpzs); if (result != ISC_R_SUCCESS) { - goto cleanup; + goto shuttingdown; } isc_ht_init(&newnodes, rpz->rpzs->mctx, 1, ISC_HT_CASE_SENSITIVE); @@ -1932,6 +1932,7 @@ update_rpz_cb(void *data) { cleanup: isc_ht_destroy(&newnodes); +shuttingdown: rpz->updateresult = result; }