On Wed, Feb 20, 2013 at 05:28:57PM +0100, Alexander Klauer <alexander.kla...@itwm.fraunhofer.de> wrote: > semantics as a call to free(ptr). A C89-conformant implementation may > return a unique non-NULL pointer which may be safely passed to > free().
And when does this happen *in libev*? realloc frees the memory for cases where the ptr is != 0 and size = 0, which is all that libev relies on. And currently, the default allocator calls free in all cases where size == 0 for portability. > The attached patch changes ev_realloc_emul() so that > ev_realloc_emul(ptr, 0) has free(ptr) semantics in all cases. When sending patches you should always check current sources, because that patch has already been applied, for other reasons. -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / schm...@schmorp.de -=====/_/_//_/\_,_/ /_/\_\ _______________________________________________ libev mailing list libev@lists.schmorp.de http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev