In the kvargs test cases, we were checking for errors by checking if the
returned pointer value was NULL. In the error handling, we then tried to
free back the NULL pointer, which would cause a crash.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
kvlist = rte_kvargs_parse(args, valid_keys);
if (kvlist == NULL) {
printf("rte_kvargs_parse() error");
- rte_kvargs_free(kvlist);
goto fail;
}
rte_kvargs_free(kvlist);
kvlist = rte_kvargs_parse(args, valid_keys);
if (kvlist == NULL) {
printf("rte_kvargs_parse() error");
- rte_kvargs_free(kvlist);
goto fail;
}
/* call check_handler() for all entries with key="check" */
kvlist = rte_kvargs_parse(args, valid_keys);
if (kvlist == NULL) {
printf("rte_kvargs_parse() error");
- rte_kvargs_free(kvlist);
goto fail;
}
/* call check_handler() on all entries with key="check", it