make silently leaking a define for better integration into other programmes
This commit is contained in:
parent
e0853c5908
commit
4e975aa081
6
aalloc.c
6
aalloc.c
@ -1,6 +1,6 @@
|
|||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/aalloc.c,v 1.24 2008/11/12 19:23:09 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/aalloc.c,v 1.25 2008/11/12 23:34:02 tg Exp $");
|
||||||
|
|
||||||
/* mksh integration of aalloc */
|
/* mksh integration of aalloc */
|
||||||
|
|
||||||
@ -12,6 +12,8 @@ __RCSID("$MirOS: src/bin/mksh/aalloc.c,v 1.24 2008/11/12 19:23:09 tg Exp $");
|
|||||||
#define AALLOC_WARN internal_warningf
|
#define AALLOC_WARN internal_warningf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define AALLOC_LEAK_SILENT /* the code does not yet clean up at exit */
|
||||||
|
|
||||||
#ifndef AALLOC_RANDOM
|
#ifndef AALLOC_RANDOM
|
||||||
#if HAVE_ARC4RANDOM
|
#if HAVE_ARC4RANDOM
|
||||||
#define AALLOC_RANDOM() arc4random()
|
#define AALLOC_RANDOM() arc4random()
|
||||||
@ -283,7 +285,7 @@ track_check(void)
|
|||||||
if (!(bp = check_bp(tp, "atexit:track_check", tp->ocookie)))
|
if (!(bp = check_bp(tp, "atexit:track_check", tp->ocookie)))
|
||||||
goto track_next;
|
goto track_next;
|
||||||
if (bp->last != (char *)&bp->storage)
|
if (bp->last != (char *)&bp->storage)
|
||||||
#ifdef MKSH_VERSION /* allowed to leak silently */
|
#ifdef AALLOC_LEAK_SILENT
|
||||||
adelete_leak(tp, bp, false, "at exit");
|
adelete_leak(tp, bp, false, "at exit");
|
||||||
#else
|
#else
|
||||||
adelete_leak(tp, bp, true, "at exit");
|
adelete_leak(tp, bp, true, "at exit");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user