mirror of
https://github.com/darlinghq/darling-libxpc.git
synced 2024-11-23 03:39:40 +00:00
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:
parent
1e6fc31277
commit
b4880a260e
@ -165,7 +165,7 @@ XPC_CLASS_HEADER(pipe);
|
|||||||
mach_msg_return_t ret = MACH_MSG_SUCCESS;
|
mach_msg_return_t ret = MACH_MSG_SUCCESS;
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
[message release];
|
if (message != NULL) { [message release]; }
|
||||||
message = dispatch_mach_msg_create(NULL, messageSize, DISPATCH_MACH_MSG_DESTRUCTOR_DEFAULT, &header);
|
message = dispatch_mach_msg_create(NULL, messageSize, DISPATCH_MACH_MSG_DESTRUCTOR_DEFAULT, &header);
|
||||||
if (!message) {
|
if (!message) {
|
||||||
status = ENOMEM;
|
status = ENOMEM;
|
||||||
|
Loading…
Reference in New Issue
Block a user