mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
Fix sl_malloc valgrind support.
This commit is contained in:
parent
9b903cc8b1
commit
624642ba83
@ -222,7 +222,7 @@ slap_sl_mem_create(
|
||||
VGMEMP_CHANGE(sh, base, newptr, size);
|
||||
base = newptr;
|
||||
}
|
||||
VGMEMP_TRIM(sh, sh->sh_base, 0);
|
||||
VGMEMP_TRIM(sh, base, 0);
|
||||
}
|
||||
sh->sh_base = base;
|
||||
sh->sh_end = base + size;
|
||||
@ -522,7 +522,8 @@ slap_sl_free(void *ptr, void *ctx)
|
||||
p = (ber_len_t *) ((char *) p - p[-1]);
|
||||
}
|
||||
sh->sh_last = p;
|
||||
VGMEMP_TRIM(sh, sh->sh_base, sh->sh_last - sh->sh_base);
|
||||
VGMEMP_TRIM(sh, sh->sh_base,
|
||||
(char *) sh->sh_last - (char *) sh->sh_base);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user