Fix ITS#3695 preserve stack alignment in slap_sl_realloc

This commit is contained in:
Howard Chu 2005-04-30 01:15:10 +00:00
parent 8045a0882e
commit 43cd22a639

View File

@ -376,6 +376,10 @@ slap_sl_realloc(void *ptr, ber_len_t size, void *ctx)
}
if (sh->sh_stack) {
/* round up to doubleword boundary */
size += pad + sizeof( ber_len_t );
size &= ~pad;
/* Never shrink blocks */
if (size <= p[-1]) {
new = p;