From: Evan Hunt Date: Mon, 3 Apr 2023 19:18:11 +0000 (-0700) Subject: silence coverity warnings X-Git-Tag: v9.19.12~12^2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=80e2a23f9e28fa51ea311533385d894fbcbbc588;p=thirdparty%2Fbind9.git silence coverity warnings silence coverity warnings in the DNSPRS code: - CID 451097, failure to check return value of rpz_ready() - CID 451099, resource leak --- diff --git a/lib/dns/include/dns/librpz.h b/lib/dns/include/dns/librpz.h index 87d189afb85..e971ab027d4 100644 --- a/lib/dns/include/dns/librpz.h +++ b/lib/dns/include/dns/librpz.h @@ -887,6 +887,7 @@ librpz_lib_open(librpz_emsg_t *emsg, void **dl_handle, const char *path) { if (new_librpz != NULL) { if (dl_handle != NULL) { *dl_handle = handle; + handle = NULL; } return (new_librpz); } @@ -914,6 +915,7 @@ librpz_lib_open(librpz_emsg_t *emsg, void **dl_handle, const char *path) { if (new_librpz != NULL) { if (dl_handle != NULL) { *dl_handle = handle; + handle = NULL; } return (new_librpz); } diff --git a/lib/ns/query.c b/lib/ns/query.c index d82a96995b3..a5fb82169aa 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -3439,7 +3439,10 @@ dnsrps_set_p(librpz_emsg_t *emsg, ns_client_t *client, dns_rpz_st_t *st, region.length = pname_buf.size; dns_name_fromregion(st->p_name, ®ion); - rpz_ready(client, p_rdatasetp); + result = rpz_ready(client, p_rdatasetp); + if (result != ISC_R_SUCCESS) { + return (false); + } dns_db_attach(st->rpsdb, &p_db); policy = dns_dnsrps_2policy(rpsdb->result.policy); if (policy != DNS_RPZ_POLICY_RECORD) {