]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/virtio/virtio_user/vhost_user.c
net/virtio-user: fix return value not checked
[dpdk.git] / drivers / net / virtio / virtio_user / vhost_user.c
index a2b0687fcb850ecfa7a2b0c38a65bf791ac5a2bf..a159ecef615f1d19887fdb8a5c97068b9ba6effd 100644 (file)
@@ -392,7 +392,8 @@ vhost_user_setup(const char *path)
        }
 
        flag = fcntl(fd, F_GETFD);
-       fcntl(fd, F_SETFD, flag | FD_CLOEXEC);
+       if (fcntl(fd, F_SETFD, flag | FD_CLOEXEC) < 0)
+               PMD_DRV_LOG(WARNING, "fcntl failed, %s", strerror(errno));
 
        memset(&un, 0, sizeof(un));
        un.sun_family = AF_UNIX;