From 44f054fa224dd19de7adb0eb365b261b4cc425f5 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 23 Mar 2009 17:31:40 +0200 Subject: Be sure to remove the name listener in serial_port_free --- serial/port.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/serial/port.c b/serial/port.c index 4946e158..43a94471 100644 --- a/serial/port.c +++ b/serial/port.c @@ -170,8 +170,14 @@ static int port_release(struct serial_port *port) static void serial_port_free(struct serial_port *port) { + struct serial_device *device = port->device; + + if (device && port->listener_id > 0) + g_dbus_remove_watch(device->conn, port->listener_id); + if (port->id >= 0) port_release(port); + g_free(port->uuid); g_free(port); } -- cgit