[Axl] [PATCH] Fix axl memory helpers

Benoit Amiaux b.amiaux at ateme.com
Wed Nov 28 10:05:15 CET 2007


Currently, as axl_new is coded as an header define, there is a 
possibility that someone use the library using a different calloc 
implementation that the one compiled with axl. This will trash the 
memory when using axl_free on such pointers.
This is especially true when using axl across dlls.
The solution is to export axl_calloc (that axl_new uses). This ensures that

ref = axl_new(...)

will always work.

Moreover, as vortex is also reallocating some axl pointers, we need to 
export axl_realloc for the same reasons

See attached file for the patch on current trunk


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: axl_mem.patch
Url: http://lists.aspl.es/pipermail/axl/attachments/20071128/56747f0c/attachment.txt 

More information about the Axl mailing list