From 346af6f3de4735b2c7c8b6abf824bd0258c4be6c Mon Sep 17 00:00:00 2001 From: Jan Hutter Date: Tue, 29 Nov 2005 12:23:40 +0000 Subject: - fixed bug in diffie hellman exchange (no public value was written) --- Source/charon/encoding/message.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Source/charon/encoding/message.c') diff --git a/Source/charon/encoding/message.c b/Source/charon/encoding/message.c index 82572e5a8..9e962328b 100644 --- a/Source/charon/encoding/message.c +++ b/Source/charon/encoding/message.c @@ -614,6 +614,7 @@ static status_t parse_body(private_message_t *this, crypter_t *crypter, signer_t if (status != SUCCESS) { this->logger->log(this->logger, ERROR, "payload type %s could not be verified",mapping_find(payload_type_m,current_payload_type)); + current_payload->destroy(current_payload); status = VERIFY_ERROR; return status; } @@ -627,12 +628,14 @@ static status_t parse_body(private_message_t *this, crypter_t *crypter, signer_t if (status != SUCCESS) { this->logger->log(this->logger, ERROR, "encryption payload signature invaild"); + current_payload->destroy(current_payload); return status; } status = encryption_payload->decrypt(encryption_payload, crypter); if (status != SUCCESS) { this->logger->log(this->logger, ERROR, "parsing decrypted encryption payload failed"); + current_payload->destroy(current_payload); return status; } } -- cgit v1.2.3