mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
Plug virCapabilities*GuestDomain leak.
* src/capabilities.c (virCapabilitiesFreeGuestDomain): Free dom->type. (virCapabilitiesAddGuestDomain): Remove duplicate strdup stmt.
This commit is contained in:
parent
3e1aaf27fe
commit
47a4c0fa0b
@ -1,3 +1,9 @@
|
|||||||
|
Mon Mar 3 14:14:03 CET 2008 Jim Meyering <meyering@redhat.com>
|
||||||
|
|
||||||
|
Plug virCapabilities*GuestDomain leak.
|
||||||
|
* src/capabilities.c (virCapabilitiesFreeGuestDomain): Free dom->type.
|
||||||
|
(virCapabilitiesAddGuestDomain): Remove duplicate strdup stmt.
|
||||||
|
|
||||||
Mon Mar 3 07:16:35 CET 2008 Daniel Veillard <veillard@redhat.com>
|
Mon Mar 3 07:16:35 CET 2008 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in:
|
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in:
|
||||||
|
@ -73,6 +73,7 @@ virCapabilitiesFreeGuestDomain(virCapsGuestDomainPtr dom)
|
|||||||
for (i = 0 ; i < dom->info.nmachines ; i++)
|
for (i = 0 ; i < dom->info.nmachines ; i++)
|
||||||
free(dom->info.machines[i]);
|
free(dom->info.machines[i]);
|
||||||
free(dom->info.machines);
|
free(dom->info.machines);
|
||||||
|
free(dom->type);
|
||||||
|
|
||||||
free(dom);
|
free(dom);
|
||||||
}
|
}
|
||||||
@ -328,9 +329,6 @@ virCapabilitiesAddGuestDomain(virCapsGuestPtr guest,
|
|||||||
if ((dom->type = strdup(hvtype)) == NULL)
|
if ((dom->type = strdup(hvtype)) == NULL)
|
||||||
goto no_memory;
|
goto no_memory;
|
||||||
|
|
||||||
if ((dom->type = strdup(hvtype)) == NULL)
|
|
||||||
goto no_memory;
|
|
||||||
|
|
||||||
if (emulator &&
|
if (emulator &&
|
||||||
(dom->info.emulator = strdup(emulator)) == NULL)
|
(dom->info.emulator = strdup(emulator)) == NULL)
|
||||||
goto no_memory;
|
goto no_memory;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user