+4628. [bug] Fixed a potential reference leak in query_getdb().
+ [RT #45247]
+
4627. [func] Deprecate 'dig +sit', it is replaced by 'dig +cookie'.
[RT #45245]
return (result);
}
-static inline ns_dbversion_t *
+static ns_dbversion_t *
query_findversion(ns_client_t *client, dns_db_t *db) {
ns_dbversion_t *dbversion;
zonelabels, &cm, &ci, &tdbp);
/* If we successful, we found a better match. */
if (tresult == ISC_R_SUCCESS) {
+ ns_dbversion_t *dbversion;
+
/*
* If the previous search returned a zone, detach it.
*/
*/
*versionp = NULL;
- /*
- * Get our database version.
- */
- dns_db_currentversion(tdbp, versionp);
-
- /*
- * Be sure to return our database.
- */
- *dbp = tdbp;
+ dbversion = query_findversion(client, tdbp);
+ if (dbversion == NULL) {
+ result = ISC_R_NOMEMORY;
+ } else {
+ /*
+ * Be sure to return our database.
+ */
+ *dbp = tdbp;
+ *versionp = dbversion->version;
+ }
/*
* We return a null zone, No stats for DLZ zones.