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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user