diff options
Diffstat (limited to 'swaybar/tray/dbus.c')
-rw-r--r-- | swaybar/tray/dbus.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/swaybar/tray/dbus.c b/swaybar/tray/dbus.c index 2a8cefc7..f562baeb 100644 --- a/swaybar/tray/dbus.c +++ b/swaybar/tray/dbus.c @@ -108,7 +108,7 @@ static dbus_bool_t add_timeout(DBusTimeout *timeout, void *_data) { timer_settime(*timer, 0, &time, NULL); - dbus_timeout_set_data(timeout, timer, free); + dbus_timeout_set_data(timeout, timer, NULL); sway_log(L_DEBUG, "Adding DBus timeout. Interval: %ds %dms", interval_sec, interval_msec); add_timer(*timer, dispatch_timeout, timeout); @@ -121,6 +121,8 @@ static void remove_timeout(DBusTimeout *timeout, void *_data) { if (timer) { remove_timer(*timer); + timer_delete(*timer); + free(timer); } } |