DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Namburu, Chandu-babu" <chandu@amd.com>
Cc: "835703180@qq.com" <835703180@qq.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [PATCH] crypto/ccp: Check for the NULL pointer after calling rte_malloc
Date: Wed, 20 Jul 2022 08:42:04 -0700	[thread overview]
Message-ID: <20220720084204.7d2a7ddf@hermes.local> (raw)
In-Reply-To: <SN1PR12MB254448054BD7321762898094C88E9@SN1PR12MB2544.namprd12.prod.outlook.com>

On Wed, 20 Jul 2022 06:29:06 +0000
"Namburu, Chandu-babu" <chandu@amd.com> 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 *

      parent reply	other threads:[~2022-07-20 15:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-09 11:01 835703180
2022-07-20  6:29 ` Namburu, Chandu-babu
2022-07-20 13:43   ` David Marchand
2022-08-16 16:01     ` [EXT] " Akhil Goyal
2022-08-23  6:14       ` Namburu, Chandu-babu
2022-07-20 15:42   ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220720084204.7d2a7ddf@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=835703180@qq.com \
    --cc=chandu@amd.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).