util: allow calling virSocketAddrGetIPPrefix with NULL netmask or address
util: allow calling virSocketAddrGetIPPrefix with NULL netmask or address

There are times when we don't have a netmask pointer to give to
virSocketAddrGetIPPrefix() (e.g. the IP addresses in domain interfaces
only have a prefix, no netmask), but it would have caused a segv if we
called it with NULL instead of a pointer to a netmask. This patch
qualifies the code that would use the netmask or address pointers to
check for NULL first.

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