Only call release if message is not NULL

For some reason, launchd seems to stall when `[message release]` is called when message is NULL.

This only seems to be an issue with the newer source. The older source doesn't require this check. I'm worried that I might be overlooking an underlying issue...
This commit is contained in:
Thomas A 2022-05-30 17:05:16 -07:00
parent 1e6fc31277
commit b4880a260e

View File

@ -165,7 +165,7 @@ XPC_CLASS_HEADER(pipe);
mach_msg_return_t ret = MACH_MSG_SUCCESS;
retry:
[message release];
if (message != NULL) { [message release]; }
message = dispatch_mach_msg_create(NULL, messageSize, DISPATCH_MACH_MSG_DESTRUCTOR_DEFAULT, &header);
if (!message) {
status = ENOMEM;