Detected by Coverity.

* daemon/remote.c: Calling allocation function 'get_nonnull_domain' to 
  allocate memory to 'dom', but haven't released it in 'cleanup' section.
* src/qemu/qemu_command.c: Taking 'if (!port)' true branch then 'def = NULL',
  the codes jump into 'error' section, the function 'virDomainDefFree(def)'
  willn't release it.
* src/remote/remote_driver.c: Calling allocation function 'get_nonnull_domain' 
to
  allocate memory to 'dom', but haven't released it in 'no_memory' section.
* src/util/pci.c: Calling allocation function 'pciGetVirtualFunctions' on 
  'virt_fns', but haven't released it in 'out' section.
* src/vmx/vmx.c: Calling allocation function 'virConfReadMem' to allocate
  memory to 'conf' and then taking 'if (VIR_ALLOC(def) < 0)' true branch,
  the codes haven't released it before 'return NULL'.

Signed-off-by: Alex Jia <[email protected]>
---
 daemon/remote.c            |    2 ++
 src/qemu/qemu_command.c    |    1 -
 src/remote/remote_driver.c |    2 ++
 src/util/pci.c             |    1 +
 src/vmx/vmx.c              |    1 +
 5 files changed, 6 insertions(+), 1 deletions(-)

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to