mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 15:45:25 +00:00
[master] Add DLZ db version to activeversions
4628. [bug] Fixed a potential reference leak in query_getdb(). [RT #45247]
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
|||||||
|
4628. [bug] Fixed a potential reference leak in query_getdb().
|
||||||
|
[RT #45247]
|
||||||
|
|
||||||
4627. [placeholder]
|
4627. [placeholder]
|
||||||
|
|
||||||
4626. [test] Added more tests for handling of different record
|
4626. [test] Added more tests for handling of different record
|
||||||
|
@@ -973,7 +973,7 @@ ns_query_init(ns_client_t *client) {
|
|||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline ns_dbversion_t *
|
static ns_dbversion_t *
|
||||||
query_findversion(ns_client_t *client, dns_db_t *db) {
|
query_findversion(ns_client_t *client, dns_db_t *db) {
|
||||||
ns_dbversion_t *dbversion;
|
ns_dbversion_t *dbversion;
|
||||||
|
|
||||||
@@ -1476,6 +1476,8 @@ query_getdb(ns_client_t *client, dns_name_t *name, dns_rdatatype_t qtype,
|
|||||||
zonelabels, &cm, &ci, &tdbp);
|
zonelabels, &cm, &ci, &tdbp);
|
||||||
/* If we successful, we found a better match. */
|
/* If we successful, we found a better match. */
|
||||||
if (tresult == ISC_R_SUCCESS) {
|
if (tresult == ISC_R_SUCCESS) {
|
||||||
|
ns_dbversion_t *dbversion;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the previous search returned a zone, detach it.
|
* If the previous search returned a zone, detach it.
|
||||||
*/
|
*/
|
||||||
@@ -1494,15 +1496,16 @@ query_getdb(ns_client_t *client, dns_name_t *name, dns_rdatatype_t qtype,
|
|||||||
*/
|
*/
|
||||||
*versionp = NULL;
|
*versionp = NULL;
|
||||||
|
|
||||||
/*
|
dbversion = query_findversion(client, tdbp);
|
||||||
* Get our database version.
|
if (dbversion == NULL) {
|
||||||
*/
|
result = ISC_R_NOMEMORY;
|
||||||
dns_db_currentversion(tdbp, versionp);
|
} else {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Be sure to return our database.
|
* Be sure to return our database.
|
||||||
*/
|
*/
|
||||||
*dbp = tdbp;
|
*dbp = tdbp;
|
||||||
|
*versionp = dbversion->version;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We return a null zone, No stats for DLZ zones.
|
* We return a null zone, No stats for DLZ zones.
|
||||||
|
Reference in New Issue
Block a user