Commit 50714a9b authored by Mark Andrews's avatar Mark Andrews Committed by Evan Hunt
Browse files

free tmpzonename and restart_master

parent a91bf68d
Pipeline #6623 passed with stages
in 13 minutes and 43 seconds
5092. [bug] Address memory leak on SIGTERM in nsupdate when using
GSS-TSIG. [GL #558]
5091. [func] Two new global and per-view options max-cache-ttl
and min-ncache-ttl [GL #613]
 
......
......@@ -144,8 +144,8 @@ static dns_fixedname_t fuserzone;
static dns_fixedname_t fzname;
static dns_name_t *userzone = NULL;
static dns_name_t *zname = NULL;
static dns_name_t tmpzonename;
static dns_name_t restart_master;
static dns_name_t tmpzonename = DNS_NAME_INITEMPTY;
static dns_name_t restart_master = DNS_NAME_INITEMPTY;
static dns_tsig_keyring_t *gssring = NULL;
static dns_tsigkey_t *tsigkey = NULL;
static dst_key_t *sig0key = NULL;
......@@ -2354,6 +2354,8 @@ update_completed(isc_task_t *task, isc_event_t *event) {
if (usegsstsig) {
dns_name_free(&tmpzonename, gmctx);
dns_name_free(&restart_master, gmctx);
dns_name_init(&tmpzonename, 0);
dns_name_init(&restart_master, 0);
}
isc_event_free(&event);
done_update();
......@@ -2769,6 +2771,8 @@ failed_gssrequest() {
dns_name_free(&tmpzonename, gmctx);
dns_name_free(&restart_master, gmctx);
dns_name_init(&tmpzonename, NULL);
dns_name_init(&restart_master, NULL);
done_update();
}
......@@ -3178,6 +3182,12 @@ cleanup(void) {
isc_mem_free(gmctx, realm);
realm = NULL;
}
if (dns_name_dynamic(&tmpzonename)) {
dns_name_free(&tmpzonename, gmctx);
}
if (dns_name_dynamic(&restart_master)) {
dns_name_free(&restart_master, gmctx);
}
#endif
if (sig0key != NULL)
......
......@@ -182,6 +182,11 @@ LIBDNS_EXTERNAL_DATA extern const dns_name_t *dns_wildcardname;
{NULL, NULL} \
}
#define DNS_NAME_INITEMPTY { \
DNS_NAME_MAGIC, NULL, 0, 0, 0, NULL, NULL, \
{ (void *)-1, (void *)-1 }, { NULL, NULL } \
}
/*%
* Standard size of a wire format name
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment