port: fix allocation check in ring SWX

Fix logically dead code in ring port.

Coverity issue: 369664
Fixes: 77a413017c ("port: add ring SWX port")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
This commit is contained in:
Cristian Dumitrescu 2021-04-07 11:59:45 +01:00 committed by Thomas Monjalon
parent e4b5b2ba9c
commit ae650ff9ba

View File

@ -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 *));