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 C1D0342818; Thu, 23 Mar 2023 02:04:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 173DA42C54; Thu, 23 Mar 2023 02:04:39 +0100 (CET) Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by mails.dpdk.org (Postfix) with ESMTP id 50AFE427F2 for ; Thu, 23 Mar 2023 02:04:35 +0100 (CET) Received: by mail-pj1-f45.google.com with SMTP id d13so20115762pjh.0 for ; Wed, 22 Mar 2023 18:04:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; t=1679533474; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Qa3YxLuYR78KyinRdaIUvB22vWFQbSnuKYq4UvsuruE=; b=P2aqz1tH6bzhSwwrXIjw4R2Jg9j832Myw3HYydMYSCa0AYDPK76qPrcaaIsYAN++mD 1Pd5at9ppC86nKRawcHVSN6Fs6AFbWNzhMVKQPR4vWnob0n1YtQJnT1a+Rh6jV7JuBaP Nedg67czjk2XOkRBm6gHwbWOtfrnIt0VQfmQYVY5RZJu2w8O2LlHb8g607r8WMNpK/bt fSZ+vRC1oAJUAH1oS/syZVDWikRGVef7LNiEwPcwh5EXAdmhVQPHzVw1LnBTmpR/eo2U UgyVeZwY+VTezE2SOG0ZR6ZFldlo/pA0S4vhCMubQHf95I/UOBnw1sNUGC8bxEH7321W H+OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679533474; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Qa3YxLuYR78KyinRdaIUvB22vWFQbSnuKYq4UvsuruE=; b=4onEgsqfB44j8tU+DZi9B2d3wGjtVkq9wWEXjqMravYDiTF9Z+4+Xa03iSxa0QeQnP CP5c1E19IWwyNl7iCx/PM9GXLdTrkqde7ei2JzkcCQ2Ii4x37+YjTxfBzLfHUwym5vXQ 434SOc+aKRcOAIvWHPFjFayCn7TMrgNURZ1H2r0cFEeWH9e6E3OM4oboej7iduofxabe yZeuOgCtYejjAmwcXcYEu3heMC3pKPRjsmmnemFYOVte9dZdNDtoZY8xqqINOME9ZGxy a5yGr57wLNrKhpazyOm5gjtLHcQOL1PW4XHfO/PPxgW2jRJfL2i/jyJSfwq/wx230OF5 9BDw== X-Gm-Message-State: AO0yUKXuDqlgozG49X9rIYlHYcKxBk3Sg8WEni2FxqJvpmHxSfwjeWSp GrOQdjSeQmHhgwlyc8fcxQGQXsXK+GlhpboKaT00fQ== X-Google-Smtp-Source: AK7set+XbG84FRfmxCidayJCte2LlYnj0ivmaTxkwQC1UL8Ll+8j6CMUnEPE2wrrqxAa38WF8IjBig== X-Received: by 2002:a17:90b:1e4c:b0:23d:31c3:c9a4 with SMTP id pi12-20020a17090b1e4c00b0023d31c3c9a4mr5769237pjb.26.1679533474206; Wed, 22 Mar 2023 18:04:34 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id l9-20020a17090b078900b0023b4c0ef8f2sm135206pjz.20.2023.03.22.18.04.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 18:04:33 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Brian Dooley Subject: [PATCH 4/4] examples/fips_validation: remove unneeded null checks Date: Wed, 22 Mar 2023 18:04:28 -0700 Message-Id: <20230323010428.64020-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230323010428.64020-1-stephen@networkplumber.org> References: <20230323010428.64020-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 No check for null pointer is necessary before calling free(). Signed-off-by: Stephen Hemminger --- examples/fips_validation/main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c index 2c4353185edd..4c231fdb29cd 100644 --- a/examples/fips_validation/main.c +++ b/examples/fips_validation/main.c @@ -2288,8 +2288,7 @@ fips_mct_sha_test(void) max_outlen = md_blocks * vec.cipher_auth.digest.len; - if (vec.cipher_auth.digest.val) - free(vec.cipher_auth.digest.val); + free(vec.cipher_auth.digest.val); vec.cipher_auth.digest.val = calloc(1, max_outlen); @@ -2382,8 +2381,7 @@ fips_mct_shake_test(void) max_outlen = vec.cipher_auth.digest.len; - if (vec.cipher_auth.digest.val) - free(vec.cipher_auth.digest.val); + free(vec.cipher_auth.digest.val); vec.cipher_auth.digest.val = calloc(1, max_outlen); -- 2.39.2