charon-xpc: Properly xpc_retain() connections we xpc_release()
This commit is contained in:
@@ -211,6 +211,7 @@ METHOD(xpc_channels_t, add, void,
|
|||||||
.logger = xpc_logger_create(conn),
|
.logger = xpc_logger_create(conn),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
xpc_retain(entry->conn);
|
||||||
xpc_connection_set_event_handler(entry->conn, ^(xpc_object_t event)
|
xpc_connection_set_event_handler(entry->conn, ^(xpc_object_t event)
|
||||||
{
|
{
|
||||||
if (event == XPC_ERROR_CONNECTION_INVALID ||
|
if (event == XPC_ERROR_CONNECTION_INVALID ||
|
||||||
|
|||||||
@@ -281,6 +281,7 @@ static void cleanup_connection(private_xpc_dispatch_t *this)
|
|||||||
*/
|
*/
|
||||||
static void set_handler(private_xpc_dispatch_t *this)
|
static void set_handler(private_xpc_dispatch_t *this)
|
||||||
{
|
{
|
||||||
|
xpc_retain(this->service);
|
||||||
xpc_connection_set_event_handler(this->service, ^(xpc_object_t conn)
|
xpc_connection_set_event_handler(this->service, ^(xpc_object_t conn)
|
||||||
{
|
{
|
||||||
xpc_connection_set_event_handler(conn, ^(xpc_object_t event)
|
xpc_connection_set_event_handler(conn, ^(xpc_object_t event)
|
||||||
|
|||||||
Reference in New Issue
Block a user