From: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
To: dev@dpdk.org
Cc: Darek Stojaczyk <dariusz.stojaczyk@intel.com>,
qi.z.zhang@intel.com, anatoly.burakov@intel.com
Subject: [dpdk-dev] [PATCH] eal: fix memleak on device hotplug rollback
Date: Wed, 31 Oct 2018 14:16:53 +0100 [thread overview]
Message-ID: <20181031131653.36722-1-dariusz.stojaczyk@intel.com> (raw)
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>
---
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 reply other threads:[~2018-10-31 13:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-31 13:16 Darek Stojaczyk [this message]
2018-10-31 13:35 ` Zhang, Qi Z
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=20181031131653.36722-1-dariusz.stojaczyk@intel.com \
--to=dariusz.stojaczyk@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.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).