From fa8d578d9492e45df98c0e5eac8932484b368377 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Fri, 25 Aug 2006 09:19:42 +0000 Subject: [PATCH] fixed crash bug when doing "ipsec down" with an unknown connection --- src/charon/config/connections/local_connection_store.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/charon/config/connections/local_connection_store.c b/src/charon/config/connections/local_connection_store.c index 1f961cbcc..024754ee7 100644 --- a/src/charon/config/connections/local_connection_store.c +++ b/src/charon/config/connections/local_connection_store.c @@ -162,8 +162,11 @@ static connection_t *get_connection_by_name(private_local_connection_store_t *th iterator->destroy(iterator); pthread_mutex_unlock(&(this->mutex)); - /* get a new reference for it */ - found->get_ref(found); + if (found) + { + /* get a new reference for it */ + found->get_ref(found); + } return found; }