main: deactivate the cookie when releasing proc.

This commit is contained in:
Nikos Mavrogiannopoulos
2014-05-29 00:19:24 +02:00
parent 5759032ef9
commit ff4f895cb0

View File

@@ -569,6 +569,8 @@ void clear_lists(main_server_st *s)
close(ctmp->fd);
if (ctmp->tun_lease.fd >= 0)
close(ctmp->tun_lease.fd);
if (ctmp->cookie_ptr)
ctmp->cookie_ptr->proc = NULL;
list_del(&ctmp->list);
safe_memset(ctmp, 0, sizeof(*ctmp));
talloc_free(ctmp);