xbps_repo_open: pass the correct size to realloc().
This commit is contained in:
parent
cc19818680
commit
f7b4587e11
@ -78,7 +78,7 @@ repo_get_dict(struct xbps_repo *repo)
|
||||
if (adata == NULL) {
|
||||
adata = malloc(size);
|
||||
} else {
|
||||
adata = realloc(adata, sizeof(size) * offset);
|
||||
adata = realloc(adata, size * offset);
|
||||
if (adata == NULL) {
|
||||
free(adata);
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user