linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Cc: "kbusch@kernel.org" <kbusch@kernel.org>,
	Kev Dorman <kdorman036@gmail.com>
Subject: Re: [PATCH nvme-cli] nvme: fix asprintf return value check
Date: Sat, 25 Apr 2020 18:09:36 +0000	[thread overview]
Message-ID: <BYAPR04MB4965490C2ECCFCBB3B58E0B486D10@BYAPR04MB4965.namprd04.prod.outlook.com> (raw)
In-Reply-To: 3dda409b-bb72-1019-5ce8-e22781d45ba3@acm.org

> How about using "< 0" to check for errors? I think that's a more widely
> used approach to check for errors than checking for "== -1".
>
> Will a memory leak occur if the first asprintf() call succeeds and the
> second asprintf() call fails?
>
> Thanks,
>
> Bart.
>

Thanks for the comment, will send a V2.


_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

      reply	other threads:[~2020-04-25 18:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-25  5:58 [PATCH nvme-cli] nvme: fix asprintf return value check Chaitanya Kulkarni
2020-04-25 17:34 ` Bart Van Assche
2020-04-25 18:09   ` Chaitanya Kulkarni [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=BYAPR04MB4965490C2ECCFCBB3B58E0B486D10@BYAPR04MB4965.namprd04.prod.outlook.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=kbusch@kernel.org \
    --cc=kdorman036@gmail.com \
    --cc=linux-nvme@lists.infradead.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).