From: Cristian Dumitrescu Date: Wed, 7 Apr 2021 10:59:45 +0000 (+0100) Subject: port: fix allocation check in ring SWX X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ae650ff9ba0cb90e68441538ded08b27bccb1113;p=dpdk.git 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 --- 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 *));