DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Shiqi Liu <835703180@qq.com>
Cc: pbhagavatula@marvell.com, dev@dpdk.org, jerinj@marvell.com
Subject: Re: [PATCH] lib: Check for the NULL pointer after calling malloc
Date: Mon, 10 Oct 2022 17:46:11 +0200	[thread overview]
Message-ID: <3002219.ktpJ11cQ8Q@thomas> (raw)
In-Reply-To: <tencent_7A58A935B4A00F49E866CC56C6D08D05DD0A@qq.com>

07/07/2022 11:23, 835703180@qq.com:
> From: Shiqi Liu <835703180@qq.com>
> 
> As the possible failure of the malloc(), the not_checked and
> checked could be NULL pointer.
> Therefore, it should be better to check it in order to avoid
> the dereference of the NULL pointer.
> 
> Fixes: fa8054c8c88 ("lib/node: add ethdev control")
> Signed-off-by: Shiqi Liu <835703180@qq.com>

Removed useless braces and applied, thanks.




      reply	other threads:[~2022-10-10 15:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-07  9:23 835703180
2022-10-10 15:46 ` Thomas Monjalon [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=3002219.ktpJ11cQ8Q@thomas \
    --to=thomas@monjalon.net \
    --cc=835703180@qq.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=pbhagavatula@marvell.com \
    /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).