[Cherokee-dev] Because valgrind should look pretty

Alvaro Lopez Ortega alvaro at octality.com
Sun Oct 12 12:46:26 CEST 2008


Hi Stefan,

I've applied your patch with a little modification. Actually,  
something like this would have the same result:

cherokee_avl_free (&srv->sources,  
(cherokee_func_free_t)cherokee_source_free);

Thanks! :-)


On 11-oct-08, at 20:16, Stefan de Konink wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> This implements the TODO to free up the sources. I think it is  
> correct.
> But it is possible that it needs to be changed, or some other code is
> under influence of it.
>
>
> Stefan
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEAREKAAYFAkjw7WIACgkQYH1+F2Rqwn19TwCfSN/vq8C0Te6Eo1rxCD/8UeeA
> 13gAni3XX8IfXKjIRt7/wnj+Fb+GVnPU
> =bwn8
> -----END PGP SIGNATURE-----
> --- server.c.orig	2008-10-11 18:54:25.344899760 +0200
> +++ server.c	2008-10-11 19:39:58.681899080 +0200
> @@ -290,6 +290,14 @@
> }
>
>
> +static int
> +remove_source (void *value)
> +{
> +	cherokee_source_t *src = value;
> +	src->free (src);
> +}
> +
> +
> ret_t
> cherokee_server_free (cherokee_server_t *srv)
> {
> @@ -339,8 +347,7 @@
> 	cherokee_buffer_mrproper (&srv->pidfile);
> 	cherokee_buffer_mrproper (&srv->panic_action);
>
> -	//
> -	// TODO: Free srv->sources
> +	cherokee_avl_free (&srv->sources, (cherokee_func_free_t)  
> remove_source);
>
> 	/* Module loader: It must be the last action to be performed
> 	 * because it will close all the opened modules.
> _______________________________________________
> Cherokee-dev mailing list
> Cherokee-dev at lists.octality.com
> http://lists.octality.com/listinfo/cherokee-dev

--
Octality
http://www.octality.com/



More information about the Cherokee-dev mailing list