Bernhard Loos bernhardloos@googlemail.com writes:
+static UINT add_row(MSIWHEREVIEW *wv, UINT val) {
- MSIHASHENTRY *new = msi_alloc(sizeof(MSIHASHENTRY));
- MSIHASHENTRY *prev;
- MSIROWENTRY *new;
- if (wv->reorder_size <= wv->row_count)
- {
MSIROWENTRY **new_reorder;
UINT newsize = wv->reorder_size * 2;
new_reorder = msi_alloc_zero(sizeof(MSIROWENTRY *) * newsize);
if (!new_reorder)
return ERROR_OUTOFMEMORY;
memcpy(new_reorder, wv->reorder, wv->row_count * sizeof(MSIROWENTRY *));
msi_free(wv->reorder);
Any reason for not doing a realloc instead?