aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/qemu-sockets.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 8b75541ce4..a1cf47e625 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -1079,6 +1079,9 @@ void socket_listen_cleanup(int fd, Error **errp)
SocketAddress *addr;
addr = socket_local_address(fd, errp);
+ if (!addr) {
+ return;
+ }
if (addr->type == SOCKET_ADDRESS_TYPE_UNIX
&& addr->u.q_unix.path) {