]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsns: remove if-after-xcalloc
authorKarel Zak <kzak@redhat.com>
Tue, 20 Feb 2018 13:59:40 +0000 (14:59 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 20 Feb 2018 13:59:40 +0000 (14:59 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/lsns.c

index 9f99152a490035157d3a725cdd1ec4e55ba95213..dce92901e8c718eb60ed8edd4328327b26eafdee 100644 (file)
@@ -437,10 +437,6 @@ static int read_process(struct lsns *ls, pid_t pid)
                return -errno;
 
        p = xcalloc(1, sizeof(*p));
-       if (!p) {
-               rc = -ENOMEM;
-               goto done;
-       }
        p->netnsid = LSNS_NETNS_UNUSABLE;
 
        if (fstat(dirfd(dir), &st) == 0) {