httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joachim Zobel <>
Subject RE: Memory leaks on adding module directives on virtual host.
Date Thu, 09 Jul 2009 19:28:08 GMT
Am Donnerstag, den 09.07.2009, 09:11 +0530 schrieb Jaysingh Samuel:
> In the command table we get the serverConfig pointer and store the
> value like the following. 
> serverConf =
>  ap_get_module_config(parms->server->module_config, &xyz_module); 
> serverConf->abc = apr_pstrdup(parms->pool, arg);

This looks OK and you should not need any cleanup function to free the
memory allocated by apr_strdup. You don't allocate any memory with
malloc or the like?

You could however use apr_pool_cleanup_register on the parms->pool to
register a cleanup function that writes a log entry every time the pool
is cleared or destroyed.


View raw message