DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Olivier Matz <olivier.matz@6wind.com>
Cc: Owen Hilyard <ohilyard@iol.unh.edu>, dev <dev@dpdk.org>,
	dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3] tests/cmdline: fix memory leaks
Date: Thu, 24 Jun 2021 15:24:53 +0200	[thread overview]
Message-ID: <CAJFAV8zzw6dhU3Gjp-3CD7JaKzd9kPRdTSGun1V3rW0Uva9=6w@mail.gmail.com> (raw)
In-Reply-To: <YNR1muhb00HVyNp0@platinum>

On Thu, Jun 24, 2021 at 2:08 PM Olivier Matz <olivier.matz@6wind.com> wrote:
> > -     if (cmdline_file_new(&ctx, "prompt", "/dev/null") == NULL) {
> > +     cl = cmdline_file_new(&ctx, "prompt", "/dev/null");
> > +     if (cl == NULL) {
> >               printf("Error: failed to open /dev/null for reading!");
> > +             cmdline_free(cl);
> >               return -1;
> >       }
>
> The cmdline_free(cl) after a if (cl == NULL) is not needed.

I took the liberty of doing the change when applying and added your ack.
Thanks.


-- 
David Marchand


  reply	other threads:[~2021-06-24 13:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16 16:25 [dpdk-dev] [PATCH] " ohilyard
2021-06-16 16:48 ` David Marchand
2021-06-16 18:07 ` ohilyard
2021-06-23  8:43   ` Olivier Matz
2021-06-23 18:06   ` [dpdk-dev] [PATCH v3] " ohilyard
2021-06-24 12:07     ` Olivier Matz
2021-06-24 13:24       ` David Marchand [this message]
2021-06-24 13:25     ` David Marchand

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='CAJFAV8zzw6dhU3Gjp-3CD7JaKzd9kPRdTSGun1V3rW0Uva9=6w@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ohilyard@iol.unh.edu \
    --cc=olivier.matz@6wind.com \
    --cc=stable@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).