summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r--lib/libalpm/sync.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 7e40d986..a025b68a 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -1135,8 +1135,9 @@ static int check_validity(alpm_handle_t *handle,
if(_alpm_pkg_validate_internal(handle, v.path, v.pkg,
v.level, &v.siglist, &v.validation) == -1) {
+ struct validity *invalid;
v.error = handle->pm_errno;
- struct validity *invalid = malloc(sizeof(struct validity));
+ MALLOC(invalid, sizeof(struct validity), return -1);
memcpy(invalid, &v, sizeof(struct validity));
errors = alpm_list_add(errors, invalid);
} else {