Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=5cb2e3061af9a44eeda84acd7277177e98baed7d

commit 5cb2e3061af9a44eeda84acd7277177e98baed7d
Author: Michel Hermier <herm...@frugalware.org>
Date:   Fri Jul 29 22:56:41 2011 +0200

group.c: Use _pacman_malloc.

diff --git a/lib/libpacman/group.c b/lib/libpacman/group.c
index 03a3ad8..2193f10 100644
--- a/lib/libpacman/group.c
+++ b/lib/libpacman/group.c
@@ -33,13 +33,10 @@

pmgrp_t *_pacman_grp_new()
{
-       pmgrp_t* grp;
+       pmgrp_t* grp = _pacman_malloc(sizeof(pmgrp_t));

-       grp = (pmgrp_t *)malloc(sizeof(pmgrp_t));
if(grp == NULL) {
-               _pacman_log(PM_LOG_ERROR, _("malloc failure: could not allocate 
%d bytes"),
-                                       sizeof(pmgrp_t));
-               RET_ERR(PM_ERR_MEMORY, NULL);
+               return(NULL);
}

grp->name[0] = '\0';
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to