do not destroy packet twice if message generation failed

This commit is contained in:
Martin Willi
2009-05-12 14:38:48 +02:00
parent e1fa02bc62
commit 8f0ab613e5
+1
View 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);