From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Stojaczyk, Dariusz" <dariusz.stojaczyk@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Subject: Re: [dpdk-dev] [PATCH] eal: fix memleak on device hotplug rollback
Date: Wed, 31 Oct 2018 13:35:17 +0000 [thread overview]
Message-ID: <039ED4275CED7440929022BC67E70611532DDD06@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20181031131653.36722-1-dariusz.stojaczyk@intel.com>
> -----Original Message-----
> From: Stojaczyk, Dariusz
> Sent: Wednesday, October 31, 2018 8:17 AM
> To: dev@dpdk.org
> Cc: Stojaczyk, Dariusz <dariusz.stojaczyk@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Burakov, Anatoly <anatoly.burakov@intel.com>
> Subject: [PATCH] eal: fix memleak on device hotplug rollback
>
> Fixes: 244d5130719c ("eal: enable hotplug on multi-process")
> Cc: qi.z.zhang@intel.com
> Cc: anatoly.burakov@intel.com
>
> Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Thanks
Qi
> ---
> lib/librte_eal/common/hotplug_mp.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lib/librte_eal/common/hotplug_mp.c
> b/lib/librte_eal/common/hotplug_mp.c
> index b68e4cabb..7c9fcc46c 100644
> --- a/lib/librte_eal/common/hotplug_mp.c
> +++ b/lib/librte_eal/common/hotplug_mp.c
> @@ -243,7 +243,7 @@ static void __handle_primary_request(void *param)
> da = calloc(1, sizeof(*da));
> if (da == NULL) {
> ret = -ENOMEM;
> - goto quit;
> + break;
> }
>
> ret = rte_devargs_parse(da, req->devargs); @@ -266,6 +266,8 @@
> static void __handle_primary_request(void *param)
>
> ret = local_dev_remove(dev);
> quit:
> + free(da->args);
> + free(da);
> break;
> default:
> ret = -EINVAL;
> --
> 2.17.1
next prev parent reply other threads:[~2018-10-31 13:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-31 13:16 Darek Stojaczyk
2018-10-31 13:35 ` Zhang, Qi Z [this message]
2018-11-01 23:07 ` Thomas Monjalon
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=039ED4275CED7440929022BC67E70611532DDD06@SHSMSX103.ccr.corp.intel.com \
--to=qi.z.zhang@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=dariusz.stojaczyk@intel.com \
--cc=dev@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).