From: Alan T. DeKok Date: Thu, 30 Mar 2023 02:26:33 +0000 (+0900) Subject: let's remove the timer events when we free the socket, m'kay? X-Git-Tag: release_3_2_3~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c409023ededea179a8b433a0ce7a5c8532932aa;p=thirdparty%2Ffreeradius-server.git let's remove the timer events when we free the socket, m'kay? --- 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); }