aboutsummaryrefslogtreecommitdiff
path: root/contrib/vhost-user-gpu
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/vhost-user-gpu')
-rw-r--r--contrib/vhost-user-gpu/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/vhost-user-gpu/main.c b/contrib/vhost-user-gpu/main.c
index 9614c9422c..e0b6df5b4d 100644
--- a/contrib/vhost-user-gpu/main.c
+++ b/contrib/vhost-user-gpu/main.c
@@ -1160,6 +1160,10 @@ main(int argc, char *argv[])
if (opt_socket_path) {
int lsock = unix_listen(opt_socket_path, &error_fatal);
+ if (lsock < 0) {
+ g_printerr("Failed to listen on %s.\n", opt_socket_path);
+ exit(EXIT_FAILURE);
+ }
fd = accept(lsock, NULL, NULL);
close(lsock);
} else {