From ae650ff9ba0cb90e68441538ded08b27bccb1113 Mon Sep 17 00:00:00 2001 From: Cristian Dumitrescu Date: Wed, 7 Apr 2021 11:59:45 +0100 Subject: [PATCH] port: fix allocation check in ring SWX Fix logically dead code in ring port. Coverity issue: 369664 Fixes: 77a413017c2d ("port: add ring SWX port") Signed-off-by: Cristian Dumitrescu --- lib/librte_port/rte_swx_port_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_port/rte_swx_port_ring.c b/lib/librte_port/rte_swx_port_ring.c index 4df720d91f..8a076a2135 100644 --- a/lib/librte_port/rte_swx_port_ring.c +++ b/lib/librte_port/rte_swx_port_ring.c @@ -195,7 +195,7 @@ writer_create(void *args) goto error; p->params.name = strdup(params->name); - if (!p) + if (!p->params.name) goto error; p->pkts = calloc(params->burst_size, sizeof(struct rte_mbuf *));