On Fri, 13 Apr 2012 17:02:07 +0200, Andy Polyakov via RT <[email protected]>
wrote:
2) Structure x509_lookup_method_st aka X509_LOOKUP_METHOD has a member
called "free". It conflicts with MS Visual Studio memory debugger. When
memory debugger is enabled, it defines the following:
#define free(p) _free_dbg(p, _NORMAL_BLOCK)
And compilation fails. The patch renames "free" to "free_item",
analogous
to "new_item" member in the same structure.
Renaming structure members in released code is not desirable. How about
--- crypto/x509/x509_lu.c 19 Feb 2010 18:27:07 -0000 1.34
+++ crypto/x509/x509_lu.c 13 Apr 2012 14:58:30 -0000
@@ -87,7 +87,7 @@
if (ctx == NULL) return;
if ( (ctx->method != NULL) &&
(ctx->method->free != NULL))
- ctx->method->free(ctx);
+ (*ctx->method->free)(ctx);
OPENSSL_free(ctx);
}
instead?
Yes, it seems to work.
I couldn't check it with the MSDEV memory debugger, but I've made a simple
testing patch (attached) and tried it. It compiled successfully both by
GCC on Linux and by MSDEV on Windows.
--
Alexei.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [email protected]