do not destroy packet twice if message generation failed
[strongswan.git] / 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);