Correctly call THREAD_UNLOCK() if the recursive call trap is sprung.

Pointed out by:		knu
This commit is contained in:
Poul-Henning Kamp 2001-11-16 18:15:33 +00:00
parent ff03d48894
commit 4b9a9ef10b

View File

@ -1114,6 +1114,7 @@ free(void *ptr)
if (malloc_active++) {
wrtwarning("recursive call\n");
malloc_active--;
THREAD_UNLOCK();
return;
}
if (ptr != ZEROSIZEPTR)
@ -1134,6 +1135,7 @@ realloc(void *ptr, size_t size)
if (malloc_active++) {
wrtwarning("recursive call\n");
malloc_active--;
THREAD_UNLOCK();
return (0);
}
if (ptr && !malloc_started) {