[libvirt] [PATCH 0/6] Resolve some Coverity errors and other issues found

John Ferlan jferlan at redhat.com
Fri Jan 9 16:02:01 UTC 2015

With the build fix, my coverity build worked again (good), but found
more issues (boo).  

Consider these changes partially as a replacement for Pavel's patch:


with some additional changes for checks that need to be made in failure
path scenario.  I didn't make any of the code formatting changes Pavel
had made for virDomainNetIpsFormat, but I can do that. I just wanted to
get these on the list for a comparison. Additionally, Pavel's change for
virDomainNetRoutesFormat didn't take into account that the alloc's are
done in a for loop, so both the VIR_FREE's needed to be done in the loop.

There are still some Coverity issues left over after this, but I'm not
quite sure how to fix them, hence the reply on the Xen-xl parser:


John Ferlan (6):
  openvz: Resolve Coverity RESOURCE_LEAK
  openvz: Check errors from virSocketAddrFormat
  domain_conf: Resolve Coverity RESOURCE_LEAK
  domain_conf: Check errors from virSocketAddrFormat
  xenconfig: Resolve Coverity RESOURCE_LEAK
  virconf: Resolve a possible memory leak in virConfSetValue

 src/conf/domain_conf.c     | 32 ++++++++++++++++++++++++--------
 src/openvz/openvz_driver.c |  3 +++
 src/util/virconf.c         |  4 +++-
 src/xenconfig/xen_xl.c     |  6 +++---
 4 files changed, 33 insertions(+), 12 deletions(-)


More information about the libvir-list mailing list