fixed crash bug when doing "ipsec down" with an unknown connection
This commit is contained in:
@@ -162,8 +162,11 @@ static connection_t *get_connection_by_name(private_local_connection_store_t *th
|
|||||||
iterator->destroy(iterator);
|
iterator->destroy(iterator);
|
||||||
pthread_mutex_unlock(&(this->mutex));
|
pthread_mutex_unlock(&(this->mutex));
|
||||||
|
|
||||||
/* get a new reference for it */
|
if (found)
|
||||||
found->get_ref(found);
|
{
|
||||||
|
/* get a new reference for it */
|
||||||
|
found->get_ref(found);
|
||||||
|
}
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user