index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Allan McRae <allan@archlinux.org> | 2014-03-08 16:58:30 +1000 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-03-08 16:58:30 +1000 |
commit | ffdc2c5396903ec0dd2b7ab4623f7f7674827885 (patch) | |
tree | 1934e4c5234940b0694ef9f70ef71f0041d1f6d0 /lib/libalpm/pkghash.c | |
parent | f3a280bc67c0f2e7b57f3772599f989b0df4d945 (diff) |
-rw-r--r-- | lib/libalpm/pkghash.c | 5 |
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; |