[13/16] app/test-dma-perf: verify strdup return value
Checks
Commit Message
Add verify strdup return value logic.
Fixes: 623dc9364dc6 ("app/dma-perf: introduce DMA performance test")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
app/test-dma-perf/main.c | 2 ++
1 file changed, 2 insertions(+)
@@ -206,6 +206,8 @@ parse_lcore_dma(struct test_configure *test_case, const char *value)
return -1;
input = strndup(value, strlen(value) + 1);
+ if (input == NULL)
+ return -1;
addrs = input;
while (*addrs == '\0')