Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/pkghash.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/pkghash.c')
-rw-r--r--lib/libalpm/pkghash.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/libalpm/pkghash.c b/lib/libalpm/pkghash.c
index 2f682784..a740233d 100644
--- a/lib/libalpm/pkghash.c
+++ b/lib/libalpm/pkghash.c
@@ -172,10 +172,7 @@ static alpm_pkghash_t *pkghash_add_pkg(alpm_pkghash_t *hash, alpm_pkg_t *pkg,
position = get_hash_position(pkg->name_hash, hash);
- ptr = malloc(sizeof(alpm_list_t));
- if(ptr == NULL) {
- return hash;
- }
+ MALLOC(ptr, sizeof(alpm_list_t), return hash);
ptr->data = pkg;
ptr->prev = ptr;