ipc: It's okay to send zero handles

This commit is contained in:
Jakob Bornecrantz 2020-08-18 19:16:22 +01:00 committed by Jakob Bornecrantz
parent 019e962f94
commit 201b5337df
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
ipc: Allow sending zero handles as a reply, at least the Linux fd handling code
allows this.

View file

@ -187,7 +187,7 @@ ipc_send_fds(struct ipc_message_channel *imc,
assert(data != NULL);
assert(size != 0);
assert(handles != NULL);
assert(num_handles != 0);
union imcontrol_buf u = {0};
size_t cmsg_size = CMSG_SPACE(sizeof(int) * num_handles);