]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables: Coverity: NEGATIVE_RETURNS
authorJiri Popelka <jpopelka@redhat.com>
Fri, 10 Jun 2011 13:25:57 +0000 (15:25 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Wed, 22 Jun 2011 13:55:17 +0000 (15:55 +0200)
libipq.c:232: var_tested_neg: Variable "h->fd" tests negative.
libipq.c:234: negative_returns: "h->fd" is passed to a parameter that
cannot be negative.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
libipq/libipq.c

index e3304875f969ea2cc8bece2e9baf1d01aafd2d9a..fb65971a1822ae37ec759979b2a8e77a3c03c5ff 100644 (file)
@@ -231,7 +231,6 @@ struct ipq_handle *ipq_create_handle(uint32_t flags, uint32_t protocol)
         
        if (h->fd == -1) {
                ipq_errno = IPQ_ERR_SOCKET;
-               close(h->fd);
                free(h);
                return NULL;
        }