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) {
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user