mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-14 00:25:17 +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
|
||||
qemuDomainXmlNsDefFree(qemuDomainXmlNsDefPtr def)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if (!def)
|
||||
return;
|
||||
|
||||
for (i = 0; i < def->num_args; i++)
|
||||
VIR_FREE(def->args[i]);
|
||||
for (i = 0; i < def->num_env; i++) {
|
||||
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);
|
||||
virStringListFreeCount(def->args, def->num_args);
|
||||
virStringListFreeCount(def->env_name, def->num_env);
|
||||
virStringListFreeCount(def->env_value, def->num_env);
|
||||
|
||||
VIR_FREE(def);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user