mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-14 08:35:15 +00:00
qemu: domain: Use virStringListFreeCount in qemuDomainXmlNsDefFree
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a967b2f0bd
commit
ad4b08fa50
@ -3090,20 +3090,13 @@ virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks = {
|
|||||||
static void
|
static void
|
||||||
qemuDomainXmlNsDefFree(qemuDomainXmlNsDefPtr def)
|
qemuDomainXmlNsDefFree(qemuDomainXmlNsDefPtr def)
|
||||||
{
|
{
|
||||||
size_t i;
|
|
||||||
|
|
||||||
if (!def)
|
if (!def)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < def->num_args; i++)
|
virStringListFreeCount(def->args, def->num_args);
|
||||||
VIR_FREE(def->args[i]);
|
virStringListFreeCount(def->env_name, def->num_env);
|
||||||
for (i = 0; i < def->num_env; i++) {
|
virStringListFreeCount(def->env_value, def->num_env);
|
||||||
VIR_FREE(def->env_name[i]);
|
|
||||||
VIR_FREE(def->env_value[i]);
|
|
||||||
}
|
|
||||||
VIR_FREE(def->args);
|
|
||||||
VIR_FREE(def->env_name);
|
|
||||||
VIR_FREE(def->env_value);
|
|
||||||
VIR_FREE(def);
|
VIR_FREE(def);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user