[gnome-online-accounts/gnome-3-18] lastfm: Don't leak AddAccountData::access_token



commit 6ca9679abeecd7f7b40a1f410e39e63eb8c4f7d7
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Sat Sep 19 22:56:44 2015 +0200

    lastfm: Don't leak AddAccountData::access_token
    
    This fixes:
    ==4326==-
    ==4326== 33 bytes in 1 blocks are definitely lost in loss record 8,436 of 18,511
    ==4326==    at 0x4A06C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==4326==    by 0x8D780AC: g_malloc (gmem.c:97)
    ==4326==    by 0x8D783C5: g_malloc_n (gmem.c:336)
    ==4326==    by 0x8D93B9A: g_strdup (gstrfuncs.c:356)
    ==4326==    by 0x4C9C67D: check_cb (goalastfmprovider.c:531)
    ==4326==    by 0x4F16A4E: _call_message_completed_cb (rest-proxy-call.c:698)
    ==4326==    by 0x51A875D: soup_session_process_queue_item (soup-session.c:2106)
    ==4326==    by 0x51A88D7: async_run_queue (soup-session.c:2145)
    ==4326==    by 0x51A89FE: idle_run_queue (soup-session.c:2179)
    ==4326==    by 0x8D72470: g_idle_dispatch (gmain.c:5397)
    ==4326==    by 0x8D6FAB8: g_main_dispatch (gmain.c:3122)
    ==4326==    by 0x8D708FC: g_main_context_dispatch (gmain.c:3737)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=755315

 src/goabackend/goalastfmprovider.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/goabackend/goalastfmprovider.c b/src/goabackend/goalastfmprovider.c
index a53042f..852c9a2 100644
--- a/src/goabackend/goalastfmprovider.c
+++ b/src/goabackend/goalastfmprovider.c
@@ -758,6 +758,7 @@ add_account (GoaProvider    *provider,
   else
     g_assert (ret != NULL);
 
+  g_free (data.access_token);
   g_free (data.account_object_path);
   if (data.loop != NULL)
     g_main_loop_unref (data.loop);
@@ -892,6 +893,7 @@ refresh_account (GoaProvider    *provider,
   gtk_widget_destroy (dialog);
   if (data.loop != NULL)
     g_main_loop_unref (data.loop);
+  g_free (data.access_token);
   g_clear_object (&data.cancellable);
   return ret;
 }


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