From: Steve Dickson <SteveD@redhat.com>
To: Susant Sahani <ssahani@redhat.com>,
Libtirpc-devel Mailing List
<libtirpc-devel@lists.sourceforge.net>
Cc: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: Re: [Libtirpc-devel] [PATCH] __nc_error() does not check return value from malloc
Date: Mon, 25 Nov 2013 15:09:52 -0500 [thread overview]
Message-ID: <5293AE90.30004@RedHat.com> (raw)
In-Reply-To: <1384966173-6229-2-git-send-email-ssahani@redhat.com>
On 20/11/13 11:49, Susant Sahani wrote:
> Signed-off-by: Susant Sahani <ssahani@redhat.com>
Committed....
steved.
> ---
> src/getnetconfig.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/getnetconfig.c b/src/getnetconfig.c
> index af4a484..2460a6e 100644
> --- a/src/getnetconfig.c
> +++ b/src/getnetconfig.c
> @@ -146,7 +146,8 @@ __nc_error()
> return (&nc_error);
> }
> if ((nc_addr = (int *)thr_getspecific(nc_key)) == NULL) {
> - nc_addr = (int *)malloc(sizeof (int));
> + if((nc_addr = (int *)malloc(sizeof (int))) == NULL)
> + return (&nc_error);
> if (thr_setspecific(nc_key, (void *) nc_addr) != 0) {
> if (nc_addr)
> free(nc_addr);
>
next prev parent reply other threads:[~2013-11-25 20:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-20 16:49 [PATCH 1/1] data race in bindresvport_sa Susant Sahani
2013-11-20 16:49 ` [PATCH] __nc_error() does not check return value from malloc Susant Sahani
2013-11-25 20:09 ` Steve Dickson [this message]
2013-11-20 16:49 ` [PATCH 1/1] race in clnt_vc_create Susant Sahani
2013-11-20 16:49 ` [PATCH 1/1] Race in getnetconfig Susant Sahani
2013-11-22 16:28 ` [PATCH 1/1] data race in bindresvport_sa Steve Dickson
2013-11-25 17:49 ` Susant Sahani
2013-11-25 20:11 ` [Libtirpc-devel] " Steve Dickson
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=5293AE90.30004@RedHat.com \
--to=steved@redhat.com \
--cc=libtirpc-devel@lists.sourceforge.net \
--cc=linux-nfs@vger.kernel.org \
--cc=ssahani@redhat.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).