Commit 2e16b7974f for strongswan.org

commit 2e16b7974f7eb4384248a0f7c488b48b1dc85214
Author: Tobias Brunner <tobias@strongswan.org>
Date:   Wed Sep 9 16:37:31 2026 +0200

    shunt-manager: Use correct destruction of shunt list

    The list contains `entry_t` items.  Note that we don't expect any items
    in this list as the daemon calls `flush()` before it destroys the manager.
    Since that clears the list and disables installation of any further shunt
    policies, the list will always be empty.  So this is a defensive change
    in case the manager is destroyed without calling `flush()` (e.g. if used
    outside of the daemon).

    Closes strongswan/strongswan#3141

    Fixes: 7a0fdbab4266 ("shunt-manager: Add an optional namespace for each shunt")

diff --git a/src/libcharon/sa/shunt_manager.c b/src/libcharon/sa/shunt_manager.c
index 2b5cae816e..843642ac1d 100644
--- a/src/libcharon/sa/shunt_manager.c
+++ b/src/libcharon/sa/shunt_manager.c
@@ -457,7 +457,7 @@ METHOD(shunt_manager_t, flush, void,
 METHOD(shunt_manager_t, destroy, void,
 	private_shunt_manager_t *this)
 {
-	this->shunts->destroy_offset(this->shunts, offsetof(child_cfg_t, destroy));
+	this->shunts->destroy_function(this->shunts, (void*)entry_destroy);
 	this->lock->destroy(this->lock);
 	this->condvar->destroy(this->condvar);
 	free(this);