From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E5F03A04AD; Mon, 24 Jan 2022 18:54:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 98790429D0; Mon, 24 Jan 2022 18:48:56 +0100 (CET) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id 54807429BD for ; Mon, 24 Jan 2022 18:48:49 +0100 (CET) Received: by mail-pl1-f182.google.com with SMTP id u11so16311198plh.13 for ; Mon, 24 Jan 2022 09:48:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ACG2GULbo70icFSXGiZ3Z6qsdoKq1S0d5ObGSsVkXTs=; b=sCjI6hzMkG30zBh8ZgGEvm+ByVzeMx3DRScX145cf2NPfkzqVwkqgTFpvQzYYYvPfm KOrPKmCz656ALXh7FXGZVq2panuANy0skHwkhygARB+MpBctGeqKFN3AB60rRgTbjrza 4xC1E1eLuj2KMdyZjJrSxXrLx9SIhAmu7jfv94GQPsJlh7NyxEcjKEqY2Ehm5VSgt0bc g2vCjY5zh6RBGAddh8Az0t8PaHbz6ru42L60Jzv/+kzZbKF7BWjDj4e10zGsRM7BrnA1 cH49k9pQ5lS8+ySMomgGNAAzskTKEKlfWF14ICmfT7OEYArt1/R+D8HKE93pYw425WUK R+og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ACG2GULbo70icFSXGiZ3Z6qsdoKq1S0d5ObGSsVkXTs=; b=M4qkeIvCwmLA7Hx3ulEkKsx8NkhHPDjkoUHynAl0+aPjStIlsW4kof+muiSEyzHFqO f8P1cFA1RxKe01QBJIt9F5YU5hWKg1nCMCD/qMrg/ezDV0cAessQW2k0FDdqNqNAtYUK NY0fmJi5J0wHhxSbbx22LUcucbwc6skhL/aWlBVL9tUY5+Y4miZvJz20o+xHraq9Cc6h 6MXFZ2XncN1ExtPJ9qoFoyqMC/vYFOWCh9mRsjy4pomf5o59rh1us57GOxnS3FgQlL3W wPq98fDAe2tgqjOP6m5d77CB7fU10lwRfzar2WvWjh6N+xJU8z2PutJf6xdgjc15NKJO TjKg== X-Gm-Message-State: AOAM53113z+d7uKIzzKE8QlrF8oWmyM3n/4+B++NzxqnE3Yp1ZGJNO9O Ir8ix5BCJFKVBLPlmKOu2AFzsKc1BkGyKA== X-Google-Smtp-Source: ABdhPJzj9EpP4ll3uCNUZ+yDPlDeGokb65i9WJ9PjtnPiWYDruD8qgnHwXajf6uSm2BYqtbnUXAiSw== X-Received: by 2002:a17:902:ce91:b0:14b:42a0:8adf with SMTP id f17-20020a170902ce9100b0014b42a08adfmr7984842plg.1.1643046528390; Mon, 24 Jan 2022 09:48:48 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id q7sm15835082pfs.37.2022.01.24.09.48.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:47 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Konstantin Ananyev , Bernard Iremonger , Vladimir Medvedkin Subject: [PATCH v2 80/83] ipsec: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:47:16 -0800 Message-Id: <20220124174719.14417-81-stephen@networkplumber.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220124174719.14417-1-stephen@networkplumber.org> References: <20220124000518.319850-1-stephen@networkplumber.org> <20220124174719.14417-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Remove redundant NULL pointer checks before free functions found by nullfree.cocci Signed-off-by: Stephen Hemminger --- lib/ipsec/ipsec_sad.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ipsec/ipsec_sad.c b/lib/ipsec/ipsec_sad.c index 531e1e323cdc..af4b1ce757d2 100644 --- a/lib/ipsec/ipsec_sad.c +++ b/lib/ipsec/ipsec_sad.c @@ -440,8 +440,7 @@ rte_ipsec_sad_destroy(struct rte_ipsec_sad *sad) rte_hash_free(sad->hash[RTE_IPSEC_SAD_SPI_DIP]); rte_hash_free(sad->hash[RTE_IPSEC_SAD_SPI_DIP_SIP]); rte_free(sad); - if (te != NULL) - rte_free(te); + rte_free(te); } /* -- 2.30.2