]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
prlimit: use xalloc libs
authorDavidlohr Bueso <dave@gnu.org>
Tue, 20 Dec 2011 11:58:16 +0000 (12:58 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 20 Dec 2011 12:09:32 +0000 (13:09 +0100)
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
sys-utils/prlimit.c

index c785909e63a23ad4963b6211e8a6c2a0f88c15c1..8235eb143854ffb176be0d25cdb568c66732a8aa 100644 (file)
@@ -452,7 +452,7 @@ static int parse_prlim(struct rlimit *lim, char *ops, size_t id)
 
 static int add_prlim(char *ops, struct list_head *lims, size_t id)
 {
-       struct prlimit *lim = calloc(1, sizeof(*lim));
+       struct prlimit *lim = xcalloc(1, sizeof(*lim));
 
        INIT_LIST_HEAD(&lim->lims);
        lim->desc = &prlimit_desc[id];