httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nadav Har'El" <...@math.technion.ac.il>
Subject Re: [madhusudan_mathihalli@hp.com: [PATCH] Try to use OPENSSL_free instead of free]
Date Thu, 24 Oct 2002 10:12:14 GMT
> Based on Nadav Har'El's e-mail on the mod_ssl community
> (http://marc.theaimsgroup.com/?l=apache-modssl&m=103540998016916&w=2),
> here's a patch for 2.0's mod_ssl.
>...
> +        modssl_free(cp);
>...
> +#define modssl_free free

I'm not sure this patch addresses my concern. The idea was that OPENSSL_free()
should be used, not free(), on memory originally allocated by the OpenSSL
library. This is because you cannot (or should not) assume how OPENSSL_malloc()
is implemented, and whether or not it's simply malloc().

So you probably meant to do
#define modssl_free OPENSSL_free

But I have another question about this patch - why did you choose the name
"modssl_free"? These frees are of memory allocated by the OpenSSL library,
not by mod_ssl, so the name modssl_free is misleading.
What's wrong with using OPENSSL_free for memory allocated and returned by
OpenSSL routines?


-- 
Nadav Har'El                        |   Thursday, Oct 24 2002, 18 Heshvan 5763
nyh@math.technion.ac.il             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |He who has more is not happier than he
http://nadav.harel.org.il           |who wants less.

Mime
View raw message