modules: fix proxy ref-count

This commit is contained in:
Julian Bouzas
2019-06-18 08:34:54 -04:00
parent e603ed4215
commit 3feddf5579
3 changed files with 4 additions and 4 deletions

View File

@@ -82,7 +82,7 @@ proxy_node_created(GObject *initable, GAsyncResult *res, gpointer d)
struct proxy_info *pi = d;
const struct module_data *data = pi->data;
g_autoptr (WpCore) core = wp_module_get_core (data->module);
WpProxyNode *proxy_node = NULL;
g_autoptr (WpProxyNode) proxy_node = NULL;
struct endpoint_info *ei = NULL;
WpEndpoint *endpoint = NULL;
g_autoptr (GVariant) endpoint_props = NULL;

View File

@@ -170,11 +170,11 @@ simple_endpoint_set_property (GObject * object, guint property_id,
switch (property_id) {
case PROP_NODE_PROXY:
g_clear_object(&self->proxy_node);
self->proxy_node = g_value_get_object(value);
self->proxy_node = g_value_dup_object(value);
break;
case PROP_PORT_PROXY:
g_clear_object(&self->proxy_port);
self->proxy_port = g_value_get_object(value);
self->proxy_port = g_value_dup_object(value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);

View File

@@ -75,7 +75,7 @@ proxy_node_created(GObject *initable, GAsyncResult *res, gpointer data)
{
struct proxy_info *pi = data;
const struct impl *impl = pi->impl;
WpProxyNode *proxy_node = NULL;
g_autoptr(WpProxyNode) proxy_node = NULL;
struct endpoint_info *ei = NULL;
GVariantBuilder b;
g_autoptr(GVariant) endpoint_props = NULL;