more silently

This commit is contained in:
tg 2008-11-12 06:44:04 +00:00
parent bfec7328d4
commit 1cf58ac17e

View File

@ -1,6 +1,6 @@
#include "sh.h" #include "sh.h"
__RCSID("$MirOS: src/bin/mksh/aalloc.c,v 1.19 2008/11/12 06:42:22 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/aalloc.c,v 1.20 2008/11/12 06:44:04 tg Exp $");
/* mksh integration of aalloc */ /* mksh integration of aalloc */
@ -275,14 +275,14 @@ track_check(void)
} }
if (!(bp = check_bp(ap, "atexit:track_check", ap->ocookie))) if (!(bp = check_bp(ap, "atexit:track_check", ap->ocookie)))
goto track_next; goto track_next;
if (bp->last == (char *)&bp->storage) { if (bp->last != (char *)&bp->storage)
AALLOC_WARN("leaking empty area %p (%p %lu)", ap,
bp, (unsigned long)(bp->endp - (char *)bp));
} else
#ifdef MKSH_VERSION /* allowed to leak silently */ #ifdef MKSH_VERSION /* allowed to leak silently */
adelete_leak(ap, bp, false, "at exit"); adelete_leak(ap, bp, false, "at exit");
#else #else
adelete_leak(ap, bp, true, "at exit"); adelete_leak(ap, bp, true, "at exit");
else
AALLOC_WARN("leaking empty area %p (%p %lu)", ap,
bp, (unsigned long)(bp->endp - (char *)bp));
#endif #endif
free(bp); free(bp);
track_next: track_next: