From bbc13f20cb53d9b36ff03cd8c918db0b2437b108 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Mar 1998 10:34:25 +0000 Subject: [PATCH] (mcheck): Allow installation when malloc is uninitialized or is just initializing. --- malloc/mcheck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/malloc/mcheck.c b/malloc/mcheck.c index 1a80a565700..93ab6421765 100644 --- a/malloc/mcheck.c +++ b/malloc/mcheck.c @@ -1,5 +1,5 @@ /* Standard debugging hooks for `malloc'. - Copyright (C) 1990,91,92,93,94,95,96,97 Free Software Foundation, Inc. + Copyright (C) 1990,91,92,93,94,95,96,97,98 Free Software Foundation, Inc. Written May 1989 by Mike Haertel. This library is free software; you can redistribute it and/or @@ -212,7 +212,7 @@ mcheck (func) abortfunc = (func != NULL) ? func : &mabort; /* These hooks may not be safely inserted if malloc is already in use. */ - if (!__malloc_initialized && !mcheck_used) + if (!__malloc_initialized <= 0 && !mcheck_used) { old_free_hook = __free_hook; __free_hook = freehook; -- 2.47.2