LPM library is supposed to return NULL pointer on an attempt
to call rte_lpm_create with an existing name.
Fixes: 134975073af3 ("lib: remove unnecessary pointer cast")
Cc: [email protected]
Signed-off-by: Anatoly Burakov <[email protected]>
---
lib/librte_lpm/rte_lpm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index d464dbd..efbbbca 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -254,6 +254,7 @@ rte_lpm_create_v1604(const char *name, int socket_id,
if (strncmp(name, lpm->name, RTE_LPM_NAMESIZE) == 0)
break;
}
+ lpm = NULL;
if (te != NULL) {
rte_errno = EEXIST;
--
2.7.4