summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2014-05-25 11:00:41 +0200
committerJens Georg <mail@jensge.org>2014-05-25 11:19:53 +0200
commit8fdd98c381d4c7ddc8d14c90a09e244a0827ab00 (patch)
tree6942558fc546b2cf12adfc890a6c393aee9eacb4
parentbb6fbdd3272de42a2621adf563b60abc6960f235 (diff)
downloadgupnp-8fdd98c381d4c7ddc8d14c90a09e244a0827ab00.tar.gz
Unref root device in ACL server handler
We have an indirect reference through handler->service, so no need to keep around the one added through g_object_get. This fixes the case where test-bugs randomly ran into timeouts because it subscribed to the wrong service on the wrong (dangling) device. Signed-off-by: Jens Georg <mail@jensge.org>
-rw-r--r--libgupnp/gupnp-context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgupnp/gupnp-context.c b/libgupnp/gupnp-context.c
index d7c0433..b942369 100644
--- a/libgupnp/gupnp-context.c
+++ b/libgupnp/gupnp-context.c
@@ -1393,6 +1393,10 @@ gupnp_acl_server_handler (SoupServer *server,
g_object_get (handler->service,
"root-device", &device,
NULL);
+
+ if (device != NULL) {
+ g_object_unref (device);
+ }
}
agent = soup_message_headers_get_one (msg->request_headers,