fix geometric growth in _alpm_greedy_grow

It was allocating the required size rather than the calculated new size,
resulting in pathological incremental reallocations.

Signed-off-by: Daniel Micay <danielmicay@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Daniel Micay 2015-01-14 07:27:41 -05:00 committed by Allan McRae
parent 21281e9b69
commit c6263da168
1 changed files with 1 additions and 1 deletions

View File

@ -1326,7 +1326,7 @@ void *_alpm_greedy_grow(void **data, size_t *current, const size_t required)
return NULL;
}
return _alpm_realloc(data, current, required);
return _alpm_realloc(data, current, newsize);
}
void _alpm_alloc_fail(size_t size)