Coverity complains over the [n]values pairing in virQEMUCapsFreeStringList
and rather than make a bunch if "if values" checks prior to calling, by
just adding the values check inside the free function we avoid the chance
that somehow nvalues is > 0, while values == NULL
char **values)
{
size_t i;
+ if (!values)
+ return;
for (i = 0; i < len; i++)
VIR_FREE(values[i]);
VIR_FREE(values);
ret = nproplist;
cleanup:
- if (ret < 0 && proplist)
+ if (ret < 0)
virQEMUCapsFreeStringList(nproplist, proplist);
return ret;
}