xbps_repo_open: pass the correct size to realloc().

This commit is contained in:
Juan RP 2013-12-16 07:31:15 +01:00
parent cc19818680
commit f7b4587e11

View File

@ -78,7 +78,7 @@ repo_get_dict(struct xbps_repo *repo)
if (adata == NULL) { if (adata == NULL) {
adata = malloc(size); adata = malloc(size);
} else { } else {
adata = realloc(adata, sizeof(size) * offset); adata = realloc(adata, size * offset);
if (adata == NULL) { if (adata == NULL) {
free(adata); free(adata);
return NULL; return NULL;