[telepathy-account-widgets] account-settings: Fix 'account_req' leak



commit f4738e48ed9e9f19c95eb90315befa79027bfd5d
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Wed Jul 29 22:49:03 2015 +0200

    account-settings: Fix 'account_req' leak
    
    tpaw_account_settings_do_create_account() creates a TpAccountRequest
    using tp_account_request_new() but never release its ref when it no
    longer needs it. Adding the missing unref() fixes the following leak:
    
    ==21491== 848 (40 direct, 808 indirect) bytes in 1 blocks are definitely lost in loss record 18,879 of 
19,643
    ==21491==    at 0x8792D3A: g_type_create_instance (gtype.c:1848)
    ==21491==    by 0x8779AC5: g_object_new_internal (gobject.c:1774)
    ==21491==    by 0x877A71A: g_object_new_valist (gobject.c:2033)
    ==21491==    by 0x87796C5: g_object_new (gobject.c:1617)
    ==21491==    by 0x567A173: tp_account_request_new (account-request.c:750)
    ==21491==    by 0x4CBAF7F: tpaw_account_settings_do_create_account (tpaw-account-settings.c:1382)
    ==21491==    by 0x4CBB270: tpaw_account_settings_apply_async (tpaw-account-settings.c:1464)
    ==21491==    by 0x4CBE023: tpaw_account_widget_apply_and_log_in (tpaw-account-widget.c:1009)
    ==21491==    by 0x4CBE042: account_widget_apply_clicked_cb (tpaw-account-widget.c:1017)
    ==21491==    by 0x87741EA: g_cclosure_marshal_VOID__VOID (gmarshal.c:875)
    ==21491==    by 0x8771238: g_closure_invoke (gclosure.c:801)
    ==21491==    by 0x878E070: signal_emit_unlocked_R (gsignal.c:3581)
    ==21491==    by 0x878D3A7: g_signal_emit_valist (gsignal.c:3337)
    ==21491==    by 0x878D8E9: g_signal_emit (gsignal.c:3393)
    ==21491==    by 0x7326A22: gtk_button_clicked (gtkbutton.c:1488)
    ==21491==    by 0x7327943: gtk_button_do_release (gtkbutton.c:1899)
    ==21491==    by 0x7327D22: gtk_real_button_released (gtkbutton.c:2017)
    ==21491==    by 0x877427D: g_cclosure_marshal_VOID__VOIDv (gmarshal.c:905)
    ==21491==    by 0x877190F: g_type_class_meta_marshalv (gclosure.c:1021)
    ==21491==    by 0x87714D1: _g_closure_invoke_va (gclosure.c:864)
    ==21491==    by 0x878C771: g_signal_emit_valist (gsignal.c:3246)
    ==21491==    by 0x878D8E9: g_signal_emit (gsignal.c:3393)
    ==21491==    by 0x73244D2: multipress_released_cb (gtkbutton.c:613)
    ==21491==    by 0x36E5A05DAF: ffi_call_unix64 (unix64.S:76)
    ==21491==    by 0x36E5A05817: ffi_call (ffi64.c:525)
    ==21491==    by 0x8772F7C: g_cclosure_marshal_generic_va (gclosure.c:1594)
    ==21491==    by 0x87714D1: _g_closure_invoke_va (gclosure.c:864)
    ==21491==    by 0x878C771: g_signal_emit_valist (gsignal.c:3246)
    ==21491==    by 0x878D8E9: g_signal_emit (gsignal.c:3393)
    ==21491==    by 0x7421792: gtk_gesture_multi_press_end (gtkgesturemultipress.c:273)
    ==21491==    by 0x8775B90: g_cclosure_marshal_VOID__BOXEDv (gmarshal.c:1950)
    ==21491==    by 0x877190F: g_type_class_meta_marshalv (gclosure.c:1021)
    ==21491==    by 0x87714D1: _g_closure_invoke_va (gclosure.c:864)
    ==21491==    by 0x878C771: g_signal_emit_valist (gsignal.c:3246)
    ==21491==    by 0x878D8E9: g_signal_emit (gsignal.c:3393)
    ==21491==    by 0x741D17F: _gtk_gesture_set_recognized (gtkgesture.c:275)
    ==21491==    by 0x741D28D: _gtk_gesture_check_recognized (gtkgesture.c:315)
    ==21491==    by 0x741DBD6: gtk_gesture_handle_event (gtkgesture.c:623)
    ==21491==    by 0x7423555: gtk_gesture_single_handle_event (gtkgesturesingle.c:220)
    ==21491==    by 0x73DBD1E: gtk_event_controller_handle_event (gtkeventcontroller.c:224)
    =
    
    https://bugzilla.gnome.org/show_bug.cgi?id=752938

 tp-account-widgets/tpaw-account-settings.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/tp-account-widgets/tpaw-account-settings.c b/tp-account-widgets/tpaw-account-settings.c
index 541ef39..82f7054 100644
--- a/tp-account-widgets/tpaw-account-settings.c
+++ b/tp-account-widgets/tpaw-account-settings.c
@@ -1406,6 +1406,7 @@ tpaw_account_settings_do_create_account (TpawAccountSettings *self)
 
   tp_account_request_create_account_async (account_req,
       tpaw_account_settings_created_cb, self);
+  g_object_unref (account_req);
 }
 
 static GVariant *


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