[coverity] 1047683 Unchecked return value from library

This commit is contained in:
akallabeth 2024-04-12 08:41:28 +02:00 committed by akallabeth
parent 68f0e0a325
commit f0cc78fe1a

View File

@ -256,7 +256,14 @@ static BOOL freerdp_listener_open_local(freerdp_listener* instance, const char*
return FALSE;
}
fcntl(sockfd, F_SETFL, O_NONBLOCK);
int rc = fcntl(sockfd, F_SETFL, O_NONBLOCK);
if (rc != 0)
{
WLog_ERR(TAG, "fcntl(sockfd, F_SETFL, O_NONBLOCK)");
closesocket((SOCKET)sockfd);
return FALSE;
}
addr.sun_family = AF_UNIX;
strncpy(addr.sun_path, path, sizeof(addr.sun_path) - 1);
unlink(path);