test: fix devargs test case memory leak
PATCH 1/1 test: fix devargs test case memory leak
In layer argument test function, kvargs are parsed and checked without free. This patch calls rte_kvargs_free() function to avoid memory leak.
Fixes a4975cd20dca ("test: add devargs test cases")
Signed-off-by Xueming Li <[email protected]>
--- app/test/test_devargs.c | 2 ++ 1 file changed, 2 insertions(+)
app/test/test_devargs.c +2 -0
@@ -43,8 +43,10 @@ test_args(const char *devargs, const char *layer, const char *args, const int n)if ((int )kvlist->count != n) {printf ("rte_devargs_parse(%s) %s_str: %s kv number %u, not %d\n" , devargs, layer, args, kvlist->count, n); +rte_kvargs_free (kvlist);return -1 ; } +rte_kvargs_free (kvlist);return 0 ; }
Signature · 1 line
2.33.0
Quoted 4 lines · Xueming Li
In layer argument test function, kvargs are parsed and checked without free. This patch calls
rte_kvargs_free()function to avoid memory leak.
Coverity issue: 373631
Quoted 3 lines
Fixes a4975cd20dca ("test: add devargs test cases")Signed-off-by Xueming Li <[email protected]>
Reviewed-by David Marchand <[email protected]>
Signature · 1 line
David Marchand
David Marchand
AppliedQuoted 11 lines · David Marchand
Quoted 4 lines · Xueming Li
In layer argument test function, kvargs are parsed and checked without free. This patch calls
rte_kvargs_free()function to avoid memory leak.Coverity issue: 373631
Quoted 3 lines
Fixes a4975cd20dca ("test: add devargs test cases")Signed-off-by Xueming Li <[email protected]>Reviewed-by David Marchand <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand