summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2015-01-04 12:56:35 +0100
committerJens Georg <mail@jensge.org>2015-01-04 12:58:25 +0100
commit3e4f29b1fe2e9e4a7b72b5fe98f9c76f753ee167 (patch)
tree0c9a6aadcc2af29f15508ddc38426fe40be4882f
parentd43006b7c1e59fab5425137d43bc241a04e5504e (diff)
downloadgupnp-3e4f29b1fe2e9e4a7b72b5fe98f9c76f753ee167.tar.gz
acl: Don't keep reference of the service
The handler will live at least as long as the service since it's bound to the context so there is no need to keep a reference of it. Signed-off-by: Jens Georg <mail@jensge.org> https://bugzilla.gnome.org/show_bug.cgi?id=742075
-rw-r--r--libgupnp/gupnp-acl.c4
-rw-r--r--libgupnp/gupnp-service.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/libgupnp/gupnp-acl.c b/libgupnp/gupnp-acl.c
index 9ee6340..387d003 100644
--- a/libgupnp/gupnp-acl.c
+++ b/libgupnp/gupnp-acl.c
@@ -206,8 +206,8 @@ acl_server_handler_new (GUPnPService *service,
void
acl_server_handler_free (AclServerHandler *handler)
{
- g_clear_pointer (&handler->service, NULL);
- g_clear_pointer (&handler->context, NULL);
+ handler->service = NULL;
+ handler->context = NULL;
if (handler->notify != NULL)
handler->notify (handler->user_data);
diff --git a/libgupnp/gupnp-service.c b/libgupnp/gupnp-service.c
index fbccdb7..54372b7 100644
--- a/libgupnp/gupnp-service.c
+++ b/libgupnp/gupnp-service.c
@@ -1463,8 +1463,8 @@ gupnp_service_constructor (GType type,
handler = acl_server_handler_new (GUPNP_SERVICE (object),
context,
control_server_handler,
- g_object_ref (object),
- g_object_unref);
+ object,
+ NULL);
_gupnp_context_add_server_handler_with_data (context, path, handler);
g_free (path);
g_free (url);
@@ -1475,8 +1475,8 @@ gupnp_service_constructor (GType type,
handler = acl_server_handler_new (GUPNP_SERVICE (object),
context,
subscription_server_handler,
- g_object_ref (object),
- g_object_unref);
+ object,
+ NULL);
_gupnp_context_add_server_handler_with_data (context, path, handler);
g_free (path);
g_free (url);