summaryrefslogtreecommitdiff
path: root/src/libcharon/sa/ike_sa_manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/sa/ike_sa_manager.c')
-rw-r--r--src/libcharon/sa/ike_sa_manager.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libcharon/sa/ike_sa_manager.c b/src/libcharon/sa/ike_sa_manager.c
index c71c3b297..fa94bb86d 100644
--- a/src/libcharon/sa/ike_sa_manager.c
+++ b/src/libcharon/sa/ike_sa_manager.c
@@ -1613,6 +1613,9 @@ static void flush(private_ike_sa_manager_t *this)
enumerator->destroy(enumerator);
charon->bus->set_sa(charon->bus, NULL);
unlock_all_segments(this);
+
+ this->rng->destroy(this->rng);
+ this->hasher->destroy(this->hasher);
}
/**
@@ -1652,8 +1655,6 @@ static void destroy(private_ike_sa_manager_t *this)
free(this->half_open_segments);
free(this->connected_peers_segments);
- this->rng->destroy(this->rng);
- this->hasher->destroy(this->hasher);
free(this);
}