axis2_env_create_all function segfaults when log creation fails
---------------------------------------------------------------

                 Key: AXIS2C-214
                 URL: http://issues.apache.org/jira/browse/AXIS2C-214
             Project: Axis2-C
          Issue Type: Bug
          Components: util
    Affects Versions: Current (Nightly)
         Environment: linux
            Reporter: Nandika Jayawardana


axis2_env_create_all function is as follows.
AXIS2_EXTERN axis2_env_t * AXIS2_CALL axis2_env_create_all (const axis2_char_t 
*log_file,
        const axis2_log_levels_t log_level)
{
    axis2_env_t *env = NULL;
    axis2_error_t *error = NULL;
    axis2_log_t *log = NULL;
    axis2_allocator_t *allocator = NULL;
    axis2_thread_pool_t *thread_pool = NULL;

    if (!log_file)
        log_file = "/dev/stderr";

    allocator = axis2_allocator_init (NULL);
    error = axis2_error_create(allocator);
    log = axis2_log_create(allocator, NULL, log_file);
    thread_pool = axis2_thread_pool_init(allocator);
    env = axis2_env_create_with_error_log_thread_pool(allocator, error, log, 
thread_pool);
    env->log->level = log_level;
    axis2_error_init();

    return env;
}

here if axis2_log_create failed, it leads to segmentation fault at 
env->log->level = log_level;


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to