]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Check if we actually have an initiating packet to free while processing responses
authorMartin Willi <martin@revosec.ch>
Wed, 23 May 2012 09:50:12 +0000 (11:50 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 23 May 2012 09:50:12 +0000 (11:50 +0200)
src/libcharon/sa/ikev1/task_manager_v1.c

index 16391257cdd6f6b643dc438344eb3b22f6162a09..e6e7a0dd8e4de2e09a82499998b6e58dab20a5b8 100644 (file)
@@ -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)