From bfe73fd683053201c326f9ff2c8e5e0f69cc7fe7 Mon Sep 17 00:00:00 2001 From: imp Date: Wed, 16 Sep 1998 04:17:47 +0000 Subject: Replace memory leaking instances of realloc with non-leaking reallocf. In some cases replace if (a == null) a = malloc(x); else a = realloc(a, x); with simple reallocf(a, x). Per ANSI-C, this is guaranteed to be the same thing. I've been running these on my system here w/o ill effects for some time. However, the CTM-express is at part 6 of 34 for the CAM changes, so I've not been able to do a build world with the CAM in the tree with these changes. Shouldn't impact anything, but... --- lib/libc/db/btree/bt_overflow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libc/db/btree/bt_overflow.c') diff --git a/lib/libc/db/btree/bt_overflow.c b/lib/libc/db/btree/bt_overflow.c index b28b8e0..db28a22 100644 --- a/lib/libc/db/btree/bt_overflow.c +++ b/lib/libc/db/btree/bt_overflow.c @@ -99,7 +99,7 @@ __ovfl_get(t, p, ssz, buf, bufsz) #endif /* Make the buffer bigger as necessary. */ if (*bufsz < sz) { - *buf = (char *)(*buf == NULL ? malloc(sz) : realloc(*buf, sz)); + *buf = (char *)(*buf == NULL ? malloc(sz) : reallocf(*buf, sz)); if (*buf == NULL) return (RET_ERROR); *bufsz = sz; -- cgit v1.1