]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
pf-handler: Always free the object even if no socket has been opened yet
authorTobias Brunner <tobias@strongswan.org>
Mon, 19 Feb 2024 08:49:08 +0000 (09:49 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 19 Feb 2024 08:49:08 +0000 (09:49 +0100)
src/libcharon/network/pf_handler.c

index 5dab3f04fa2742304eef1d74699c8b6a76ac0acf..91b0e7507f97acc732e83ca3b09dfbab56850761 100644 (file)
@@ -221,8 +221,8 @@ METHOD(pf_handler_t, destroy, void,
        {
                lib->watcher->remove(lib->watcher, this->receive);
                close(this->receive);
-               free(this);
        }
+       free(this);
 }
 
 /**