aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--batterystate/batterystate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/batterystate/batterystate.c b/batterystate/batterystate.c
index 1ca11599..63090f37 100644
--- a/batterystate/batterystate.c
+++ b/batterystate/batterystate.c
@@ -464,6 +464,9 @@ static void attio_disconnected_cb(gpointer user_data)
{
struct battery *batt = user_data;
+ g_attrib_unregister(batt->attrib, batt->attnotid);
+ batt->attnotid = 0;
+
g_attrib_unref(batt->attrib);
batt->attrib = NULL;
}