diff options
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ld.so/malloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libexec/ld.so/malloc.c b/libexec/ld.so/malloc.c index c233d3046f6..7fe0b4e080d 100644 --- a/libexec/ld.so/malloc.c +++ b/libexec/ld.so/malloc.c @@ -172,7 +172,10 @@ hash(void *p) static __dead void wrterror(char *msg) { - _dl_die("%s error: %s", g_pool->func, msg); + if (g_pool != NULL && g_pool->func != NULL) + _dl_die("%s error: %s", g_pool->func, msg); + else + _dl_die("%s", msg); } static void |