From: Martin Willi Date: Wed, 23 May 2012 09:50:12 +0000 (+0200) Subject: Check if we actually have an initiating packet to free while processing responses X-Git-Tag: 5.0.0~235 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=51754f6654cd44b572eed8b26e7d30255cae8bca;p=thirdparty%2Fstrongswan.git Check if we actually have an initiating packet to free while processing responses --- diff --git a/src/libcharon/sa/ikev1/task_manager_v1.c b/src/libcharon/sa/ikev1/task_manager_v1.c index 16391257cd..e6e7a0dd8e 100644 --- a/src/libcharon/sa/ikev1/task_manager_v1.c +++ b/src/libcharon/sa/ikev1/task_manager_v1.c @@ -978,7 +978,7 @@ static status_t process_response(private_task_manager_t *this, enumerator->destroy(enumerator); this->initiating.type = EXCHANGE_TYPE_UNDEFINED; - this->initiating.packet->destroy(this->initiating.packet); + DESTROY_IF(this->initiating.packet); this->initiating.packet = NULL; if (this->queued && this->active_tasks->get_count(this->active_tasks) == 0)