- still one memory leak and segmentation fault
authorJan Hutter <jhutter@hsr.ch>
Mon, 21 Nov 2005 17:53:42 +0000 (17:53 -0000)
committerJan Hutter <jhutter@hsr.ch>
Mon, 21 Nov 2005 17:53:42 +0000 (17:53 -0000)
Source/charon/ike_sa.c
Source/charon/utils/logger_manager.c

index ab4d3e5..3d0b942 100644 (file)
@@ -303,7 +303,6 @@ static status_t destroy (protected_ike_sa_t *this)
        
        this->logger->log(this->logger, CONTROL | MOST, "Destroy logger of IKE_SA");
        
-       
        global_logger_manager->destroy_logger(global_logger_manager, this->logger);
 
        allocator_free(this);
index 2d1587c..0470e7a 100644 (file)
@@ -234,7 +234,7 @@ static status_t destroy_logger (private_logger_manager_t *this,logger_t *logger)
 {
        
        linked_list_iterator_t *iterator;
-       status_t status;
+       status_t status = NOT_FOUND;
        
        pthread_mutex_lock(&(this->mutex));
        if (this->loggers->create_iterator(this->loggers,&iterator,TRUE) != SUCCESS)
@@ -263,7 +263,6 @@ static status_t destroy_logger (private_logger_manager_t *this,logger_t *logger)
                }
        }
        iterator->destroy(iterator);
-
        pthread_mutex_unlock(&(this->mutex));
        return status;
 }