On 03/10/2015 07:20 PM, John Ferlan wrote:
> Some Coverity patches - the first one has been showing up in my dailies
> for a few days... The other 5 I don't see, but that's because I don't
> generally build with xenapi in my Coverity environment.  So for those,
> I'm hoping someone with that environment could check them out.
> 
> John Ferlan (6):
>   conf: Resolve Coverity RESOURCE_LEAK
>   xenapi: Resolve Coverity FORWARD_NULL
>   xenapi: Resolve Coverity NO_EFFECT
>   xenapi: Resolve Coverity NULL_RETURNS
>   xenapi: Resolve Coverity REVERSE_INULL
>   xenapi: Resolve Coverity REVERSE_INULL
> 
>  src/conf/node_device_conf.c |  1 +
>  src/xenapi/xenapi_driver.c  | 13 ++++++++-----
>  src/xenapi/xenapi_utils.c   | 33 ++++++++++++++++++---------------
>  3 files changed, 27 insertions(+), 20 deletions(-)
> 

Patch 1: Interesting that Coverity didn't pick that up. It usually does
especially since there is a VIR_FREE(tmp) after the second call to
virXMLPropString... The first one is made worse by it being a for loop
too...  NOTE: I also "tmp = NULL" and VIR_FREE(tmp) after cleanup

Patch 5: I only paid attention too late that my build wasn't actually
building xenapi... Fixed the ':' reference and the overly aggressive
free(vif).  Since I was there, I added a xen_vm_record_opt_free(vm_opt)
in the return -1;... It does seem that vm_opt gets "absorbed" into
vif_record eventually which does have free paths, so I also assumed it
would be then properly freed

I was able to figure out/find the libxenserver and libxenserver-devel
install rpm's, built, and ran my coverity checker w/ the changes.

Now pushed.

Tks,

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to