- allocator_free_chunk changed
authorJan Hutter <jhutter@hsr.ch>
Fri, 25 Nov 2005 08:11:27 +0000 (08:11 -0000)
committerJan Hutter <jhutter@hsr.ch>
Fri, 25 Nov 2005 08:11:27 +0000 (08:11 -0000)
Source/charon/sa/states/initiator_init.c
Source/charon/sa/states/responder_init.c

index f71c283..c5acbd1 100644 (file)
@@ -453,7 +453,7 @@ static status_t build_ke_payload(private_initiator_init_t *this, payload_t **pay
        if (ke_payload == NULL)
        {
                this->logger->log(this->logger, ERROR, "Could not create KE payload");
        if (ke_payload == NULL)
        {
                this->logger->log(this->logger, ERROR, "Could not create KE payload");
-               allocator_free_chunk(key_data);
+               allocator_free_chunk(&key_data);
                return OUT_OF_RES;      
        }
        ke_payload->set_dh_group_number(ke_payload, this->dh_group_number);
                return OUT_OF_RES;      
        }
        ke_payload->set_dh_group_number(ke_payload, this->dh_group_number);
@@ -461,10 +461,10 @@ static status_t build_ke_payload(private_initiator_init_t *this, payload_t **pay
        {
                this->logger->log(this->logger, ERROR, "Could not set key exchange data of KE payload");
                ke_payload->destroy(ke_payload);
        {
                this->logger->log(this->logger, ERROR, "Could not set key exchange data of KE payload");
                ke_payload->destroy(ke_payload);
-               allocator_free_chunk(key_data);
+               allocator_free_chunk(&key_data);
                return OUT_OF_RES;
        }
                return OUT_OF_RES;
        }
-       allocator_free_chunk(key_data);
+       allocator_free_chunk(&key_data);
        
        this->logger->log(this->logger, CONTROL|MORE, "ke payload builded");
 
        
        this->logger->log(this->logger, CONTROL|MORE, "ke payload builded");
 
index ffb010f..d68bfc6 100644 (file)
@@ -458,7 +458,7 @@ static status_t process_message(private_responder_init_t *this, message_t *messa
        if (next_state == NULL)
        {
                this    ->logger->log(this->logger, ERROR, "Fatal error: could not create next state object of type ike_sa_init_responded_t");
        if (next_state == NULL)
        {
                this    ->logger->log(this->logger, ERROR, "Fatal error: could not create next state object of type ike_sa_init_responded_t");
-               allocator_free_chunk(shared_secret);
+               allocator_free_chunk(&shared_secret);
                return FAILED;
        }
        
                return FAILED;
        }
        
@@ -577,7 +577,7 @@ static status_t build_ke_payload(private_responder_init_t *this, payload_t **pay
        if (ke_payload == NULL)
        {
                this->logger->log(this->logger, ERROR, "Could not create KE payload");
        if (ke_payload == NULL)
        {
                this->logger->log(this->logger, ERROR, "Could not create KE payload");
-               allocator_free_chunk(key_data);
+               allocator_free_chunk(&key_data);
                return OUT_OF_RES;      
        }
        ke_payload->set_dh_group_number(ke_payload, MODP_1024_BIT);
                return OUT_OF_RES;      
        }
        ke_payload->set_dh_group_number(ke_payload, MODP_1024_BIT);
@@ -585,10 +585,10 @@ static status_t build_ke_payload(private_responder_init_t *this, payload_t **pay
        {
                this->logger->log(this->logger, ERROR, "Could not set key exchange data of KE payload");
                ke_payload->destroy(ke_payload);
        {
                this->logger->log(this->logger, ERROR, "Could not set key exchange data of KE payload");
                ke_payload->destroy(ke_payload);
-               allocator_free_chunk(key_data);
+               allocator_free_chunk(&key_data);
                return OUT_OF_RES;
        }
                return OUT_OF_RES;
        }
-       allocator_free_chunk(key_data);
+       allocator_free_chunk(&key_data);
 
        *payload = (payload_t *) ke_payload;
        return SUCCESS;                 
 
        *payload = (payload_t *) ke_payload;
        return SUCCESS;