mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 09:58:55 +08:00
Ensure non-null pointer is used in zello_ipc tests
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
712149abf5
commit
70a2d2f850
@@ -69,6 +69,9 @@ static int recvmsg_fd(int socket) {
|
||||
}
|
||||
|
||||
struct cmsghdr *controlHeader = CMSG_FIRSTHDR(&msgHeader);
|
||||
if (CMSG_DATA(controlHeader) == nullptr) {
|
||||
return -1;
|
||||
}
|
||||
memmove(&fd, CMSG_DATA(controlHeader), sizeof(int));
|
||||
return fd;
|
||||
}
|
||||
|
||||
@@ -69,6 +69,9 @@ static int recvmsg_fd(int socket) {
|
||||
}
|
||||
|
||||
struct cmsghdr *controlHeader = CMSG_FIRSTHDR(&msgHeader);
|
||||
if (CMSG_DATA(controlHeader) == nullptr) {
|
||||
return -1;
|
||||
}
|
||||
memmove(&fd, CMSG_DATA(controlHeader), sizeof(int));
|
||||
return fd;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user