in reply to Inline::C & Strawberry: can't free a buffer allocated with asprintf

Hi,

For me, replacing:
free(s); with: __mingw_str_free(s);
seems to work fine.
( I assume that it is actually freeing the memory, but I haven't checked. )

According to https://github.com/Alexpux/mingw-w64/blob/master/mingw-w64-crt/misc/mingw_mbwc_convert.c, __mingw_str_free is:
void __cdecl __mingw_str_free(void *ptr) { if (ptr) free(ptr); }
so something (inside perl) is apparently messing with free() in such a way that it doesn't always matter ... but does matter inside the Inline::C environment.

Cheers,
Rob