When parsing the parameters for virtual device initialization,
rte_kvargs structure was being freed only if there was an error,
not when parsing was successful.
Coverity issue: 124568
Fixes:
f3e764fa2fb7 ("cryptodev: uninline parameter parsing")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
rte_cryptodev_parse_vdev_init_params(struct rte_crypto_vdev_init_params *params,
const char *input_args)
{
- struct rte_kvargs *kvlist;
- int ret;
+ struct rte_kvargs *kvlist = NULL;
+ int ret = 0;
if (params == NULL)
return -EINVAL;
}
}
- return 0;
-
free_kvlist:
rte_kvargs_free(kvlist);
return ret;