nasmlib.c: log nasm_free() before calling free()

If we're logging nasm_free(), then log it before we actually call
free(); that way we can find out what the last thing was if free()
crashes.
This commit is contained in:
H. Peter Anvin 2008-01-21 16:29:10 -08:00
parent e3b418b137
commit 216d074e97

View File

@ -96,10 +96,10 @@ void nasm_free(void *q)
#endif
{
if (q) {
free(q);
#ifdef LOGALLOC
fprintf(logfp, "%s %d free(%p)\n", file, line, q);
#endif
free(q);
}
}