summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/package.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 1f572594..7317982c 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -65,7 +65,7 @@ pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg)
{
pmpkg_t* newpkg;
- if((newpkg = calloc(0, sizeof(pmpkg_t))) == NULL) {
+ if((newpkg = calloc(1, sizeof(pmpkg_t))) == NULL) {
_alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmpkg_t));
RET_ERR(PM_ERR_MEMORY, NULL);
}