summaryrefslogtreecommitdiffstats
path: root/newlib
diff options
context:
space:
mode:
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/stdlib/mallocr.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 0a6191f2a..0d2a38c1c 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,8 @@
+2003-02-18 Earnie Boyd <earnie@users.sf.net>
+
+ * libc/stdlib/mallocr.c (unlink): Don't assign a value to a pointer
+ with a NULL value.
+
2003-02-10 Christopher Faylor <cgf@redhat.com>
* libc/include/sys/types.h: Don't define __MS_types__ for Cygwin.
diff --git a/newlib/libc/stdlib/mallocr.c b/newlib/libc/stdlib/mallocr.c
index 3da707e3d..fa2278224 100644
--- a/newlib/libc/stdlib/mallocr.c
+++ b/newlib/libc/stdlib/mallocr.c
@@ -1936,8 +1936,8 @@ static void do_check_malloced_chunk(p, s) mchunkptr p; INTERNAL_SIZE_T s;
{ \
BK = P->bk; \
FD = P->fd; \
- FD->bk = BK; \
- BK->fd = FD; \
+ if (FD) FD->bk = BK; \
+ if (BK) BK->fd = FD; \
} \
/* Place p as the last remainder */