summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-05-09 16:07:48 +0200
committerThomas Haller <thaller@redhat.com>2016-05-09 16:08:09 +0200
commit895b25c69289f82e2b6a8b2b92b002be6f9ec550 (patch)
treeec62cc44421b714c17e63918a560e52b2a73dbdb
parent967442a1a8172094ff1729b4a0310847a39f1903 (diff)
downloadNetworkManager-bg/disconnect-on-suspend-rh1330694.tar.gz
fixup! sleep-monitor: add functions for delaying the suspensionbg/disconnect-on-suspend-rh1330694
-rw-r--r--src/nm-sleep-monitor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nm-sleep-monitor.c b/src/nm-sleep-monitor.c
index d361f55d29..8ba9e4429c 100644
--- a/src/nm-sleep-monitor.c
+++ b/src/nm-sleep-monitor.c
@@ -135,10 +135,8 @@ drop_inhibitor (NMSleepMonitor *self, gboolean force)
self->inhibit_fd = -1;
}
- if (self->handles_active) {
- self->handles_stale = g_slist_concat (self->handles_stale, self->handles_active);
- self->handles_active = NULL;
- }
+ self->handles_stale = g_slist_concat (self->handles_stale, self->handles_active);
+ self->handles_active = NULL;
nm_clear_g_cancellable (&self->cancellable);
}
@@ -365,6 +363,8 @@ dispose (GObject *object)
#if !USE_UPOWER
drop_inhibitor (self, TRUE);
#endif
+ g_slice_free (self->handles_stale);
+ self->handles_stale = NULL;
nm_clear_g_cancellable (&self->cancellable);