[gnome-online-accounts] goaalarm: small memory leak fix



commit 51caec0c3cf6646e434d7f1a0fd2e6a8f7dabff6
Author: Ray Strode <rstrode redhat com>
Date:   Fri May 9 07:14:42 2014 -0400

    goaalarm: small memory leak fix
    
    I was looking through a valgrind log and noticed this:
    
    ==30104==
    ==30104== 40 bytes in 1 blocks are possibly lost in loss record 1,472 of
    2,959
    ==30104==    at 0x4C2845D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==30104==    by 0xB6BD996: standard_malloc (gmem.c:85)
    ==30104==    by 0xB6BDAAC: g_malloc (gmem.c:159)
    ==30104==    by 0xB6DA0CE: g_slice_alloc (gslice.c:1003)
    ==30104==    by 0xB71295A: g_rec_mutex_impl_new (gthread-posix.c:271)
    ==30104==    by 0xB712AA8: g_rec_mutex_init (gthread-posix.c:339)
    ==30104==    by 0x41B7C6: goa_alarm_init (goaalarm.c:174)
    ==30104==    by 0xB4332B7: g_type_create_instance (gtype.c:1917)
    ==30104==    by 0xB416A5D: g_object_constructor (gobject.c:1855)
    ==30104==    by 0xB416149: g_object_newv (gobject.c:1719)
    ==30104==    by 0xB4169B2: g_object_new_valist (gobject.c:1836)
    ==30104==    by 0xB415AB8: g_object_new (gobject.c:1551)
    
    This commit adds the missing g_rec_mutex_clear call.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=729864

 src/goaidentity/goaalarm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/goaidentity/goaalarm.c b/src/goaidentity/goaalarm.c
index d288dc1..dbe66f1 100644
--- a/src/goaidentity/goaalarm.c
+++ b/src/goaidentity/goaalarm.c
@@ -136,6 +136,8 @@ goa_alarm_finalize (GObject *object)
 
   clear_scheduled_wakeups (self, self->priv->scheduled_wakeup_source, self->priv->stream);
 
+  g_rec_mutex_clear (&self->priv->lock);
+
   G_OBJECT_CLASS (goa_alarm_parent_class)->finalize (object);
 }
 


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