DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: Tonghao Zhang <xiangxia.m.yue@gmail.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 2/2] sched: fix possible mem leak on	initialize
Date: Thu, 20 Dec 2018 19:09:04 +0000	[thread overview]
Message-ID: <3EB4FA525960D640B5BDFFD6A3D891268E817FF9@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <CAMDZJNVLNZAi8KVWM1xGzmBcX7SxbX8tJe4vAe=VNxhVQMQQ_w@mail.gmail.com>



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tonghao Zhang
> Sent: Tuesday, December 11, 2018 2:54 AM
> To: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 2/2] sched: fix possible mem leak on initialize
> 
> ping
> On Wed, Nov 28, 2018 at 9:56 PM Tonghao Zhang
> <xiangxia.m.yue@gmail.com> wrote:
> >
> > In some case, we may create sched port dynamically,
> > if err when creating so memory will leak.
> >
> > Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> > ---
> >  lib/librte_sched/rte_sched.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
> > index 17de6e6..a3adcca 100644
> > --- a/lib/librte_sched/rte_sched.c
> > +++ b/lib/librte_sched/rte_sched.c
> > @@ -724,6 +724,7 @@ struct rte_sched_port *
> >                                     bmp_mem_size);
> >         if (port->bmp == NULL) {
> >                 RTE_LOG(ERR, SCHED, "Bitmap init error\n");
> > +               rte_free(port);
> >                 return NULL;
> >         }
> >
> > --
> > 1.8.3.1
> >

Also fixed another identical issue in the same function.

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

Applied to next-qos tree, thanks!


  reply	other threads:[~2018-12-20 19:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-28 13:55 [dpdk-dev] [PATCH 1/2] sched: refine get base helper function Tonghao Zhang
2018-11-28 13:55 ` [dpdk-dev] [PATCH 2/2] sched: fix possible mem leak on initialize Tonghao Zhang
2018-12-11  2:54   ` Tonghao Zhang
2018-12-20 19:09     ` Dumitrescu, Cristian [this message]
2018-12-20 19:10 ` [dpdk-dev] [PATCH 1/2] sched: refine get base helper function Dumitrescu, Cristian

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=3EB4FA525960D640B5BDFFD6A3D891268E817FF9@IRSMSX108.ger.corp.intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=xiangxia.m.yue@gmail.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).