diff --git a/lib/wp/session-item.c b/lib/wp/session-item.c
index f2c901321980e8e66e253ecf97ddd01adf783fc2..de3459e1789e577f168da7ea0c1ec8d87d563683 100644
--- a/lib/wp/session-item.c
+++ b/lib/wp/session-item.c
@@ -146,7 +146,8 @@ wp_session_item_default_get_associated_proxy (WpSessionItem * self,
   WpSessionItemPrivate *priv;
 
   if (WP_IS_SI_STREAM (self)) {
-    WpSiEndpoint *ep = wp_si_stream_get_parent_endpoint (WP_SI_STREAM (self));
+    g_autoptr (WpSiEndpoint) ep =
+        wp_si_stream_get_parent_endpoint (WP_SI_STREAM (self));
     priv = wp_session_item_get_instance_private (WP_SESSION_ITEM (ep));
   } else {
     priv = wp_session_item_get_instance_private (self);
diff --git a/lib/wp/si-interfaces.c b/lib/wp/si-interfaces.c
index 3da32ad326decc64af63577e97c8c93e0f60bfd2..aa8c8046c90d5028eb998930cfea9058f344db96 100644
--- a/lib/wp/si-interfaces.c
+++ b/lib/wp/si-interfaces.c
@@ -251,7 +251,7 @@ wp_si_stream_get_properties (WpSiStream * self)
  * wp_si_stream_get_parent_endpoint: (virtual get_parent_endpoint)
  * @self: the session item
  *
- * Returns: (transfer none): the endpoint that this stream belongs to
+ * Returns: (transfer full): the endpoint that this stream belongs to
  */
 WpSiEndpoint *
 wp_si_stream_get_parent_endpoint (WpSiStream * self)
diff --git a/modules/module-si-adapter.c b/modules/module-si-adapter.c
index d1ebf9e763ba5f83a301e66bd1301e7752570154..4f50575755413e9e4e32bfa694ef355594fe777d 100644
--- a/modules/module-si-adapter.c
+++ b/modules/module-si-adapter.c
@@ -512,7 +512,7 @@ si_adapter_get_stream_properties (WpSiStream * self)
 static WpSiEndpoint *
 si_adapter_get_stream_parent_endpoint (WpSiStream * self)
 {
-  return WP_SI_ENDPOINT (self);
+  return WP_SI_ENDPOINT (g_object_ref (self));
 }
 
 static void
diff --git a/modules/module-si-simple-node-endpoint.c b/modules/module-si-simple-node-endpoint.c
index 74675504489b83f699fb4e76e19d2ab7e0c8e78a..ad027251b8810652cf12dc96760cb00a3add7c02 100644
--- a/modules/module-si-simple-node-endpoint.c
+++ b/modules/module-si-simple-node-endpoint.c
@@ -323,7 +323,7 @@ si_simple_node_endpoint_get_stream_registration_info (WpSiStream * self)
 static WpSiEndpoint *
 si_simple_node_endpoint_get_stream_parent_endpoint (WpSiStream * self)
 {
-  return WP_SI_ENDPOINT (self);
+  return WP_SI_ENDPOINT (g_object_ref (self));
 }
 
 static void
diff --git a/modules/module-si-standard-link.c b/modules/module-si-standard-link.c
index 991231e452a96e248b47f5edfe16821d492906c3..3168ef3dd7388ff7bdfbe6fe2e5307eaacff09c0 100644
--- a/modules/module-si-standard-link.c
+++ b/modules/module-si-standard-link.c
@@ -327,7 +327,8 @@ si_standard_link_activate_execute_step (WpSessionItem * item,
 
   switch (step) {
   case STEP_ACQUIRE: {
-    WpSiEndpoint *out_endpoint, *in_endpoint;
+    g_autoptr (WpSiEndpoint) out_endpoint = NULL;
+    g_autoptr (WpSiEndpoint) in_endpoint = NULL;
     WpSiStreamAcquisition *out_acquisition, *in_acquisition;
 
     out_endpoint = wp_si_stream_get_parent_endpoint (self->out_stream);
@@ -382,7 +383,8 @@ static void
 si_standard_link_activate_rollback (WpSessionItem * item)
 {
   WpSiStandardLink *self = WP_SI_STANDARD_LINK (item);
-  WpSiEndpoint *out_endpoint, *in_endpoint;
+  g_autoptr (WpSiEndpoint) out_endpoint = NULL;
+  g_autoptr (WpSiEndpoint) in_endpoint = NULL;
   WpSiStreamAcquisition *out_acquisition, *in_acquisition;
 
   out_endpoint = wp_si_stream_get_parent_endpoint (self->out_stream);
diff --git a/tests/wp/endpoint.c b/tests/wp/endpoint.c
index 056a572c96eddfe7867feaeb68156955282acb2d..2eb8d85a2bab7fea9ce7399c1499278ef5561cb3 100644
--- a/tests/wp/endpoint.c
+++ b/tests/wp/endpoint.c
@@ -84,7 +84,7 @@ test_si_endpoint_get_stream_properties (WpSiStream * self)
 static WpSiEndpoint *
 test_si_endpoint_get_stream_parent_endpoint (WpSiStream * self)
 {
-  return WP_SI_ENDPOINT (self);
+  return WP_SI_ENDPOINT (g_object_ref (self));
 }
 
 static void