]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix possible memory leak in phyp_driver.c
authorPavel Hrdina <phrdina@redhat.com>
Mon, 13 Jan 2014 13:48:40 +0000 (14:48 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Wed, 15 Jan 2014 10:11:34 +0000 (11:11 +0100)
commit788e6cb25bbcdbef6fe945ac1533a40faf8f4293
tree6130c8b5eafad469602cedf775f57adf32c913bc
parent7ed02a0003f3518cdecaf0b34b7622451d6629f3
Fix possible memory leak in phyp_driver.c

There could be a memory leak caused by "managed_system" string, if any
error occurs before "managed_system" is assigned into
"phyp_driver->managed_system". The "managed_system" string wouldn't be
freed at all. The better way is to free the "managed_system" instead
of the one assigned in the "phyp_driver".

This has been found by coverity.

Pointed out by John, that the "phyp_driver->xmlopt" needs to be
unreferenced as well.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: John Ferlan <jferlan@redhat.com>
src/phyp/phyp_driver.c