[gnome-settings-daemon/gnome-3-30] color: Don't leak night light recheck GSource



commit 9eccdf88cd8cf9a3cb36be668479c616bc8ca33a
Author: Benjamin Berg <bberg redhat com>
Date:   Thu Sep 27 09:35:32 2018 +0200

    color: Don't leak night light recheck GSource
    
    We have always been leaking the GSource which is re-created every minute
    to check the current night light state. Unfortunately, now that we are
    correctly using the timerfd, we not only leak some memory but also the
    file descriptor, causing major issues.
    
    Fixes #91

 plugins/color/gsd-night-light.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/plugins/color/gsd-night-light.c b/plugins/color/gsd-night-light.c
index a28a0e0e..2a19241d 100644
--- a/plugins/color/gsd-night-light.c
+++ b/plugins/color/gsd-night-light.c
@@ -423,6 +423,7 @@ poll_timeout_destroy (GsdNightLight *self)
                 return;
 
         g_source_destroy (self->source);
+        g_source_unref (self->source);
         self->source = NULL;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]