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 B66C0A04A6; Mon, 24 Jan 2022 01:12:18 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E0F2B42964; Mon, 24 Jan 2022 01:06:48 +0100 (CET) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mails.dpdk.org (Postfix) with ESMTP id E60744294B for ; Mon, 24 Jan 2022 01:06:44 +0100 (CET) Received: by mail-pj1-f52.google.com with SMTP id my12-20020a17090b4c8c00b001b528ba1cd7so9831702pjb.1 for ; Sun, 23 Jan 2022 16:06:44 -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=7CgSMYhxsW3lUlXcI7xwfe932xda5uEDr7VeljSXWbcUPqG3Tq4Yia3e4rotxdrKgq yfH2x7PkuBlt+8gdFX0q2f4vNC5xOPP3HWMbs0iS5TAmuTcIdVex7/t/qFlesguYe2yW g4Fv+auF11q/PNSdEXt5PZrQjryTJvies+M46Pz42Z8dRlZRUW81xtXbxx3fWx/NQJCH cHSQmG2Mg/3KKm0PTzzYMmxSJnjjP50KRbfqeda9W2AbaPl9JYm4A2tK9sf4Pp9tOeVF 2xNXvJgYy4nFQZZsiaZg7Br29FBlc1o+MTldkC+C2OOGjCEKdRRiMHHmlpv0fngiGfGF 8PTA== 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=PyHDz+rIghbMFRadoXX/PZ5bWX0ulbDyTxr7ugiCRT3CK1ysHNWr0oycgHNgYSlr6o pOEYPyom36A7Ak7dMBGAKRIfNksdoitIHC8pkvXX2JQlZFHJXsGJ2XqCnHMjKJVylskR g4wPvMmsFIRdeP+Njx+ow/WkZpfHt6LKGIsH8blPmWnczS2LGE3EH3ROuT282KR2J0Fz W70xmRQglcACxWFOh/bAXsr82scSX2NlMiQUoZErPEDMiCoSvVLvqjt0GDLPlPmig8Y9 ENlPnVgTLzkugPqWfoj4kNUbvo7nYIQFSd8nrc1COaTZSFHJaJlkIDwhew9tBocNbWkV IFIw== X-Gm-Message-State: AOAM5339WGuuntMwm6vz987q9EJwdSZsaVD3KsKZQbqnxcciEp2qQkQb m8bvbcxjnyIMsltp+HF1lE3IcHSqYoHDwQ== X-Google-Smtp-Source: ABdhPJw3EKcEhzq3fKqQiVq4Ku12owWMdYZC2ah89Vtk+AV6xwYhZSIPCSghcjTgDZpUo8hJLG/JbA== X-Received: by 2002:a17:902:74c1:b0:14a:d9fa:d8a3 with SMTP id f1-20020a17090274c100b0014ad9fad8a3mr12479770plt.119.1642982803949; Sun, 23 Jan 2022 16:06:43 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id ck21sm10935350pjb.51.2022.01.23.16.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:06:43 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Konstantin Ananyev , Bernard Iremonger , Vladimir Medvedkin Subject: [PATCH 79/82] ipsec: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:05:15 -0800 Message-Id: <20220124000518.319850-80-stephen@networkplumber.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220124000518.319850-1-stephen@networkplumber.org> References: <20220124000518.319850-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