diff options
author | Martin Willi <martin@revosec.ch> | 2013-10-28 14:29:07 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2013-10-28 14:51:40 +0100 |
commit | a1c2ed88204f4fbcb6ae4edd24b5a32cdd08a0f0 (patch) | |
tree | c79fb9da2059f5fd4334bbf88d969ec90470295e /src/frontends/osx | |
parent | 888d8d73abe1eca48a853e218cb8ee1c344a7029 (diff) | |
download | strongswan-a1c2ed88204f4fbcb6ae4edd24b5a32cdd08a0f0.tar.bz2 strongswan-a1c2ed88204f4fbcb6ae4edd24b5a32cdd08a0f0.tar.xz |
charon-xpc: Properly xpc_retain() connections we xpc_release()
Diffstat (limited to 'src/frontends/osx')
-rw-r--r-- | src/frontends/osx/charon-xpc/xpc_channels.c | 1 | ||||
-rw-r--r-- | src/frontends/osx/charon-xpc/xpc_dispatch.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/frontends/osx/charon-xpc/xpc_channels.c b/src/frontends/osx/charon-xpc/xpc_channels.c index 05913a784..5e9366bf5 100644 --- a/src/frontends/osx/charon-xpc/xpc_channels.c +++ b/src/frontends/osx/charon-xpc/xpc_channels.c @@ -211,6 +211,7 @@ METHOD(xpc_channels_t, add, void, .logger = xpc_logger_create(conn), ); + xpc_retain(entry->conn); xpc_connection_set_event_handler(entry->conn, ^(xpc_object_t event) { if (event == XPC_ERROR_CONNECTION_INVALID || diff --git a/src/frontends/osx/charon-xpc/xpc_dispatch.c b/src/frontends/osx/charon-xpc/xpc_dispatch.c index df9126c8b..dd7ce1531 100644 --- a/src/frontends/osx/charon-xpc/xpc_dispatch.c +++ b/src/frontends/osx/charon-xpc/xpc_dispatch.c @@ -281,6 +281,7 @@ static void cleanup_connection(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(conn, ^(xpc_object_t event) |