From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id E533EFEB for ; Wed, 31 Oct 2018 14:19:57 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Oct 2018 06:19:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,447,1534834800"; d="scan'208";a="92669750" Received: from violet.igk.intel.com ([10.102.54.137]) by FMSMGA003.fm.intel.com with ESMTP; 31 Oct 2018 06:19:55 -0700 From: Darek Stojaczyk To: dev@dpdk.org Cc: Darek Stojaczyk , qi.z.zhang@intel.com, anatoly.burakov@intel.com Date: Wed, 31 Oct 2018 14:16:53 +0100 Message-Id: <20181031131653.36722-1-dariusz.stojaczyk@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] eal: fix memleak on device hotplug rollback X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2018 13:19:58 -0000 Fixes: 244d5130719c ("eal: enable hotplug on multi-process") Cc: qi.z.zhang@intel.com Cc: anatoly.burakov@intel.com Signed-off-by: Darek Stojaczyk --- 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