index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | lib/libalpm/package.c | 5 |
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index b7d2cb5b..8150dd7c 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -89,7 +89,8 @@ pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg) newpkg = (pmpkg_t *)malloc(sizeof(pmpkg_t)); if(newpkg == NULL) { - return(NULL); + _alpm_log(PM_LOG_ERROR, "malloc failure: could not allocate %d bytes", sizeof(pmpkg_t)); + RET_ERR(PM_ERR_MEMORY, NULL); } STRNCPY(newpkg->name, pkg->name, PKG_NAME_LEN); @@ -258,7 +259,7 @@ pmpkg_t *_alpm_pkg_load(char *pkgfile) info = _alpm_pkg_new(NULL, NULL); if(info == NULL) { tar_close(tar); - RET_ERR(PM_ERR_MEMORY, NULL); + return(NULL); } /* ORE |