If socket_listen_cleanup is passed an invalid FD, then querying the socket
local address will fail. We must thus be prepared for the returned addr to
be NULL
Reported-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
SocketAddress *addr;
addr = socket_local_address(fd, errp);
+ if (!addr) {
+ return;
+ }
if (addr->type == SOCKET_ADDRESS_TYPE_UNIX
&& addr->u.q_unix.path) {