mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 05:28:00 +00:00
accessed free memory
This commit is contained in:
parent
300cb0a397
commit
0b718ba733
@ -198,8 +198,7 @@ ns_interface_destroy(ns_interface_t **ifpret) {
|
|||||||
REQUIRE(ifpret != NULL);
|
REQUIRE(ifpret != NULL);
|
||||||
REQUIRE(VALID_IFACE(*ifpret));
|
REQUIRE(VALID_IFACE(*ifpret));
|
||||||
ifp = *ifpret;
|
ifp = *ifpret;
|
||||||
printf("destroying interface\n");
|
printf("Destroying interface\n");
|
||||||
isc_mem_put(ifp->mgr->mctx, ifp, sizeof(*ifp));
|
|
||||||
|
|
||||||
isc_socket_cancel(ifp->udpsocket, NULL, ISC_SOCKCANCEL_ALL);
|
isc_socket_cancel(ifp->udpsocket, NULL, ISC_SOCKCANCEL_ALL);
|
||||||
isc_socket_detach(&ifp->udpsocket);
|
isc_socket_detach(&ifp->udpsocket);
|
||||||
@ -212,6 +211,8 @@ ns_interface_destroy(ns_interface_t **ifpret) {
|
|||||||
ISC_LIST_UNLINK(ifp->mgr->interfaces, ifp, link);
|
ISC_LIST_UNLINK(ifp->mgr->interfaces, ifp, link);
|
||||||
|
|
||||||
ifp->magic = 0;
|
ifp->magic = 0;
|
||||||
|
isc_mem_put(ifp->mgr->mctx, ifp, sizeof(*ifp));
|
||||||
|
|
||||||
*ifpret = NULL;
|
*ifpret = NULL;
|
||||||
return (DNS_R_SUCCESS);
|
return (DNS_R_SUCCESS);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user