From 8c409023ededea179a8b433a0ce7a5c8532932aa Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Thu, 30 Mar 2023 11:26:33 +0900 Subject: [PATCH] let's remove the timer events when we free the socket, m'kay? --- src/main/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/process.c b/src/main/process.c index dd23cdc922..a6b2dc4921 100644 --- a/src/main/process.c +++ b/src/main/process.c @@ -5340,11 +5340,11 @@ static void event_status(struct timeval *wake) static void listener_free_cb(void *ctx) { rad_listen_t *this = talloc_get_type_abort(ctx, rad_listen_t); + listen_socket_t *sock = this->data; char buffer[1024]; if (this->count > 0) { struct timeval when; - listen_socket_t *sock = this->data; fr_event_now(el, &when); when.tv_sec += 3; @@ -5365,6 +5365,7 @@ static void listener_free_cb(void *ctx) this->print(this, buffer, sizeof(buffer)); DEBUG("... cleaning up socket %s", buffer); rad_assert(this->next == NULL); + TALLOC_FREE(&sock->ev); talloc_free(this); } -- 2.47.3