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.
Showing
想要评论请 注册 或 登录