2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

fix memory leak in client_addopt()

This commit is contained in:
Bob Halley
1999-10-20 23:20:30 +00:00
parent a7d792804f
commit ae51af4776

View File

@@ -413,11 +413,6 @@ client_addopt(ns_client_t *client) {
REQUIRE(client->opt == NULL); /* XXXRTH free old. */
rdataset = NULL;
result = dns_message_gettemprdataset(client->message, &rdataset);
if (result != ISC_R_SUCCESS)
return (result);
dns_rdataset_init(rdataset);
rdatalist = NULL;
result = dns_message_gettemprdatalist(client->message, &rdatalist);
if (result != ISC_R_SUCCESS)
@@ -426,6 +421,11 @@ client_addopt(ns_client_t *client) {
result = dns_message_gettemprdata(client->message, &rdata);
if (result != ISC_R_SUCCESS)
return (result);
rdataset = NULL;
result = dns_message_gettemprdataset(client->message, &rdataset);
if (result != ISC_R_SUCCESS)
return (result);
dns_rdataset_init(rdataset);
rdatalist->type = dns_rdatatype_opt;
rdatalist->covers = 0;