aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mm-serial-port.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c
index 8774d40c..dd82ce94 100644
--- a/src/mm-serial-port.c
+++ b/src/mm-serial-port.c
@@ -1112,6 +1112,13 @@ mm_serial_port_close (MMSerialPort *self)
priv->queue_id = 0;
}
+ if (priv->cancellable_id) {
+ g_assert (priv->cancellable != NULL);
+ g_cancellable_disconnect (priv->cancellable,
+ priv->cancellable_id);
+ priv->cancellable_id = 0;
+ }
+
g_clear_object (&priv->cancellable);
}