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 96F86A00C5; Wed, 20 Jul 2022 17:42:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 365B240697; Wed, 20 Jul 2022 17:42:09 +0200 (CEST) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mails.dpdk.org (Postfix) with ESMTP id 6CD8840042 for ; Wed, 20 Jul 2022 17:42:07 +0200 (CEST) Received: by mail-pg1-f179.google.com with SMTP id e132so16729160pgc.5 for ; Wed, 20 Jul 2022 08:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UOTXCnrJmPoorvM3/QzU9eJ/4qBdLzr3/zQXKEWAje4=; b=6O3Y7/p7nTTzBhKVRj0MLIEUKo6kk35HQMS6G0GAOWGQSTUDrXh3rs7jGG7pJz0eDi uDWOcNcZim1HvsCO++MGJ3y6xt0dksn7ZdhJwm3KZyNFR6w294PVZhuB+g6EoXbZALf7 iEsyJSCCxpUdOcITlGeaj2WqFO5DlsEcHOgdjG5Eu2j+FHqys8kBVgony+LRDyL+RrYp sqY5/TvNDx3RGDWSKMAXlybm/D3oqjh94OJWZ2X41PTr/xLNk4OcXzXl4ZrCjXemCrYD d3bsrcNn/MxmXN4TzYSN+dFkMxClGa+TIXAhehg4zBsYKpIWhL3m6aGX4EtTsgtFU1k2 JrnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UOTXCnrJmPoorvM3/QzU9eJ/4qBdLzr3/zQXKEWAje4=; b=7XWOadpnCdjBiZ5YqZf8ZC+uaBJeObQ/c60C/5Qk1P1MdyF+LdoANToeNA6X3SUaod anfunL8f0a1h85mtHkxR9t9uPMhEn9hWHkePuDwQV49M6weWKOKNiLAw3fKuz6PM3HFm PFKENb2bxrXIGpDD53bmBdGt0TQzLGuMFYtRxvH0sVYEJvXoDuwgrvwyjsFU9WV1Sezv ZCnkkAphsriCCMXeExt0r6ojTa6o01u4AVxPUlSb61tPiID2hadYxbW/FWNhRVQDVzmS 86UvmRTgX9juAUpgcvFx4VNs18yGCPAv9rt5zcPiUhqLn8N+brmNHPHmUosGSpvck1Jo bctg== X-Gm-Message-State: AJIora/seI9qwaPL9AAcKKI/MOlk5L/yQc4jdXUVwu1n19c4uduZMEhd 0DzM/1phCf/dB5s9SGkbK70FGA== X-Google-Smtp-Source: AGRyM1tWvi8IjAfAa1TLoe5bmnEus/XBEN5ck9/hWwkbCJ4fYYrN9e5VfsyYhqG8ZDzD0d+IBs+FBA== X-Received: by 2002:a63:5254:0:b0:41a:4cfc:72ea with SMTP id s20-20020a635254000000b0041a4cfc72eamr7454770pgl.403.1658331726432; Wed, 20 Jul 2022 08:42:06 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id g8-20020aa796a8000000b0051be16492basm13813941pfk.195.2022.07.20.08.42.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 08:42:06 -0700 (PDT) Date: Wed, 20 Jul 2022 08:42:04 -0700 From: Stephen Hemminger To: "Namburu, Chandu-babu" Cc: "835703180@qq.com" <835703180@qq.com>, "dev@dpdk.org" Subject: Re: [PATCH] crypto/ccp: Check for the NULL pointer after calling rte_malloc Message-ID: <20220720084204.7d2a7ddf@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Wed, 20 Jul 2022 06:29:06 +0000 "Namburu, Chandu-babu" wrote: > sha_ctx = (void *)rte_malloc(NULL, SHA512_DIGEST_SIZE, 64); > + if (sha_ctx == NULL) { > + return -ENOMEM; > + } There is unnecessary cast here (pre-existing). rte_malloc() already returns void *