[gnome-online-accounts/gnome-3-12] kerberos: don't free alarm in set_alarm, free in callers



commit 68820e6eddd527824a5039f66775b3d37a81b612
Author: Michael Cronenworth <mike cchtml com>
Date:   Mon Mar 17 09:33:59 2014 -0400

    kerberos: don't free alarm in set_alarm, free in callers
    
    It's a little unexpected that set_alarm "eats" the alarm passed in.
    This commit makes it the caller's responsibility to free the alarm
    to more closely match typical practice.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726353

 src/goaidentity/goakerberosidentity.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/goaidentity/goakerberosidentity.c b/src/goaidentity/goakerberosidentity.c
index e9917bf..74ee17b 100644
--- a/src/goaidentity/goakerberosidentity.c
+++ b/src/goaidentity/goakerberosidentity.c
@@ -784,7 +784,6 @@ set_alarm (GoaKerberosIdentity  *self,
 
       new_cancellable = g_cancellable_new ();
       goa_alarm_set_time (alarm, alarm_time, new_cancellable);
-      g_date_time_unref (alarm_time);
 
       g_clear_object (cancellable);
       *cancellable = new_cancellable;
@@ -879,6 +878,9 @@ reset_alarms (GoaKerberosIdentity *self)
              self->priv->expiration_alarm,
              expiration_time, &self->priv->expiration_alarm_cancellable);
 
+  g_date_time_unref (renewal_time);
+  g_date_time_unref (expiring_time);
+  g_date_time_unref (expiration_time);
   connect_alarm_signals (self);
 }
 


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