From c9d86af0ba10427bb4b3501eece3547bdd5540f1 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 15 Nov 2009 03:02:09 +0000 Subject: [PATCH] Fix 1.49 sl_realloc --- servers/slapd/sl_malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/slapd/sl_malloc.c b/servers/slapd/sl_malloc.c index ad4c1d6e7a..4df800e571 100644 --- a/servers/slapd/sl_malloc.c +++ b/servers/slapd/sl_malloc.c @@ -444,7 +444,7 @@ slap_sl_realloc(void *ptr, ber_len_t size, void *ctx) /* Nowhere to grow, need to alloc and copy */ } else { - newptr = slap_sl_malloc(size-2*sizeof(ber_len_t), ctx); + newptr = slap_sl_malloc(size-sizeof(ber_len_t), ctx); AC_MEMCPY(newptr, ptr, p[-1]-sizeof(ber_len_t)); /* mark old region as free */ p[p[-1]/sizeof(ber_len_t)-1] |= 1; -- 2.39.5