summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/db.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/db.c')
-rw-r--r--lib/libalpm/db.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 77bdf98c..33282b87 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -553,8 +553,7 @@ int _alpm_db_add_pkgincache(alpm_db_t *db, alpm_pkg_t *pkg)
return -1;
}
- newpkg = _alpm_pkg_dup(pkg);
- if(newpkg == NULL) {
+ if(_alpm_pkg_dup(pkg, &newpkg)) {
return -1;
}