bearer-qmi: avoid increasing self reference during dispose()
The reset_bearer_connection() method is called during dispose, and if a link had been created during the connection attempt, we would be increasing the reference to the bearer object during dispose(), which should never happen. Just avoid passing any callback to the cleanup_link() method, as we really were using that only for logging purposes.
This commit is contained in:
@@ -2216,18 +2216,6 @@ disconnect_finish (MMBaseBearer *self,
|
||||
return g_task_propagate_boolean (G_TASK (res), error);
|
||||
}
|
||||
|
||||
static void
|
||||
cleanup_link_ready (MMPortQmi *qmi,
|
||||
GAsyncResult *res,
|
||||
MMBearerQmi *self) /* full reference */
|
||||
{
|
||||
g_autoptr(GError) error = NULL;
|
||||
|
||||
if (!mm_port_qmi_cleanup_link_finish (qmi, res, &error))
|
||||
mm_obj_warn (self, "couldn't cleanup link: %s", error->message);
|
||||
g_object_unref (self);
|
||||
}
|
||||
|
||||
static void
|
||||
reset_bearer_connection (MMBearerQmi *self,
|
||||
gboolean reset_ipv4,
|
||||
@@ -2278,8 +2266,8 @@ reset_bearer_connection (MMBearerQmi *self,
|
||||
mm_port_qmi_cleanup_link (self->priv->qmi,
|
||||
mm_port_get_device (self->priv->link),
|
||||
self->priv->mux_id,
|
||||
(GAsyncReadyCallback) cleanup_link_ready,
|
||||
g_object_ref (self));
|
||||
NULL,
|
||||
NULL);
|
||||
g_clear_object (&self->priv->link);
|
||||
}
|
||||
self->priv->mux_id = QMI_DEVICE_MUX_ID_UNBOUND;
|
||||
|
Reference in New Issue
Block a user