do not destroy packet twice if message generation failed
authorMartin Willi <martin@strongswan.org>
Tue, 12 May 2009 12:38:48 +0000 (14:38 +0200)
committerMartin Willi <martin@strongswan.org>
Tue, 12 May 2009 12:38:48 +0000 (14:38 +0200)
src/charon/sa/task_manager.c

index e034842..354c968 100644 (file)
@@ -624,6 +624,7 @@ static status_t build_response(private_task_manager_t *this, message_t *request)
        
        /* message complete, send it */
        DESTROY_IF(this->responding.packet);
+       this->responding.packet = NULL;
        status = this->ike_sa->generate_message(this->ike_sa, message,
                                                                                        &this->responding.packet);
        charon->bus->message(charon->bus, message, FALSE);