Linux NFS development
 help / color / mirror / Atom feed
From: Steve Dickson <steved@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 1/2] Covscan Scan: Wrong Check of Return Value
Date: Wed, 11 Jan 2023 10:56:53 -0500	[thread overview]
Message-ID: <2f6880c4-26e2-c3cf-bd71-93e7b70a7b7a@redhat.com> (raw)
In-Reply-To: <20230104170855.19822-1-steved@redhat.com>



On 1/4/23 12:08 PM, Steve Dickson wrote:
> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2151966
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed... (tag: nfs-utils-2-6-3-rc6)

steved.
> ---
>   support/export/client.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/support/export/client.c b/support/export/client.c
> index ea4f89d..79164fe 100644
> --- a/support/export/client.c
> +++ b/support/export/client.c
> @@ -699,6 +699,9 @@ check_netgroup(const nfs_client *clp, const struct addrinfo *ai)
>   
>   	/* check whether the IP itself is in the netgroup */
>   	ip = calloc(INET6_ADDRSTRLEN, 1);
> +	if (ip == NULL)
> +		goto out;
> +
>   	if (inet_ntop(ai->ai_family, &(((struct sockaddr_in *)ai->ai_addr)->sin_addr), ip, INET6_ADDRSTRLEN) == ip) {
>   		if (innetgr(netgroup, ip, NULL, NULL)) {
>   			free(hname);


      parent reply	other threads:[~2023-01-11 15:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04 17:08 [PATCH 1/2] Covscan Scan: Wrong Check of Return Value Steve Dickson
2023-01-04 17:08 ` [PATCH 2/2] Covscan Scan: Fixed a couple CLANG_WARNINGs Steve Dickson
2023-01-11 15:57   ` Steve Dickson
2023-01-11 15:56 ` Steve Dickson [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=2f6880c4-26e2-c3cf-bd71-93e7b70a7b7a@redhat.com \
    --to=steved@redhat.com \
    --cc=linux-nfs@vger.kernel.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