util: reset the counters to zero
util: reset the counters to zero

After freeing the data structures we have to reset the counters to
zero. This fixes a segmentation fault when virNetDevIPInfoClear is
called twice (e.g. this is possible in virDomainNetDefParseXML() if
virDomainNetIPInfoParseXML(...) fails with ret < 0 (this leads to the
first call of 'virNetDevIPInfoClear(&def->guestIP)') and the resulting
call of virDomainNetDefFree(def) in the error path of
virDomainNetDefParseXML() (this leads to the second call of
virNetDevIPInfoClear(&def->guestIP), and finally to the segmentation
fault).

Signed-off-by: Marc Hartmayer <7bafc8cd4e6394916d396e4f8cde69753be8d066@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <2648abdd55bfebf313fd324b464b047e6eea300e@linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <40545c009452f40d2ae0bbfbd987b332d274d328@linux.vnet.ibm.com>

zippy2/libvirt,jfehlig/libvirt,fabianfreyer/libvirt,libvirt/libvirt,nertpinx/libvirt,andreabolognani/libvirt,taget/libvirt,taget/libvirt,andreabolognani/libvirt,VenkatDatta/libvirt,datto/libvirt,VenkatDatta/libvirt,eskultety/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,jardasgit/libvirt,andreabolognani/libvirt,libvirt/libvirt,datto/libvirt,jfehlig/libvirt,nertpinx/libvirt,jardasgit/libvirt,andreabolognani/libvirt,eskultety/libvirt,zippy2/libvirt,olafhering/libvirt,crobinso/libvirt,andreabolognani/libvirt,eskultety/libvirt,eskultety/libvirt,datto/libvirt,taget/libvirt,fabianfreyer/libvirt,VenkatDatta/libvirt,jardasgit/libvirt,libvirt/libvirt,olafhering/libvirt,taget/libvirt,jfehlig/libvirt,olafhering/libvirt,fabianfreyer/libvirt,nertpinx/libvirt,jfehlig/libvirt,VenkatDatta/libvirt,nertpinx/libvirt,zippy2/libvirt,crobinso/libvirt,VenkatDatta/libvirt,libvirt/libvirt,olafhering/libvirt,datto/libvirt,crobinso/libvirt,fabianfreyer/libvirt,eskultety/libvirt,jardasgit/libvirt,crobinso/libvirt,taget/libvirt,zippy2/libvirt,datto/libvirt