[dpdk-dev] [PATCH] bus/fslmc: fix err path in device iterator

Hemant Agrawal hemant.agrawal at nxp.com
Wed Jul 17 17:55:18 CEST 2019


Fixes: e67a61614d0b ("bus/fslmc: support device iteration")

Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
---
 drivers/bus/fslmc/fslmc_bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index a2ed3bcc9..9e4146aba 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -296,7 +296,7 @@ rte_fslmc_parse(const char *name, void *addr)
 
 	return 0;
 err_out:
-	if (sep)
+	if (!sep_exists && sep)
 		free(sep);
 	return -EINVAL;
 }
-- 
2.17.1



More information about the dev mailing list