From: Vsevolod Stakhov Date: Mon, 7 Jul 2025 10:02:13 +0000 (+0100) Subject: [Fix] Fix order of descriptor closing X-Git-Tag: 3.13.0~47^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c12816cbe711a82c2775091c519c414ff52df9a;p=thirdparty%2Frspamd.git [Fix] Fix order of descriptor closing --- diff --git a/src/libserver/http/http_router.c b/src/libserver/http/http_router.c index aca791a273..459401e9e4 100644 --- a/src/libserver/http/http_router.c +++ b/src/libserver/http/http_router.c @@ -1,11 +1,11 @@ -/*- - * Copyright 2019 Vsevolod Stakhov +/* + * Copyright 2025 Vsevolod Stakhov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -56,13 +56,13 @@ static void rspamd_http_entry_free(struct rspamd_http_connection_entry *entry) { if (entry != NULL) { - close(entry->conn->fd); rspamd_http_connection_unref(entry->conn); if (entry->rt->finish_handler) { entry->rt->finish_handler(entry); } DL_DELETE(entry->rt->conns, entry); + close(entry->conn->fd); g_free(entry); } }