mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Fix 1.49 sl_realloc
This commit is contained in:
parent
1eebd22151
commit
c9d86af0ba
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user