apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Mongenet" <m...@mongenet.ch>
Subject apr_thread_mutex_destroy not freeing memory
Date Thu, 29 May 2008 20:09:42 GMT
Hello,

I think that apr_thread_mutex_destroy does not free the memory
allocated in apr_thread_mutex_create (on unix, and also on win32 I think).


static apr_status_t thread_mutex_cleanup(void *data)
{
    apr_thread_mutex_t *mutex = data;
    apr_status_t rv;

    rv = pthread_mutex_destroy(&mutex->mutex);
#ifdef PTHREAD_SETS_ERRNO
    if (rv) {
        rv = errno;
    }
#endif
    return rv;
}


APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,
                                                  unsigned int flags,
                                                  apr_pool_t *pool)
{
/* ................... */

    new_mutex = apr_pcalloc(pool, sizeof(apr_thread_mutex_t));
    new_mutex->pool = pool;

/* ................... */
}


-- 
Marc Mongenet

Mime
View raw message