[gnome-online-accounts/gnome-3-18] lastfm: Remove unneeded g_strdup
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/gnome-3-18] lastfm: Remove unneeded g_strdup
- Date: Thu, 1 Oct 2015 17:48:17 +0000 (UTC)
commit 8474c7ff54425a2cd9b4f2fb332e66da66d35bdc
Author: Christophe Fergeau <cfergeau redhat com>
Date: Sat Sep 19 22:48:41 2015 +0200
lastfm: Remove unneeded g_strdup
It's not assigned to any variable and causes a leak:
==30698== 5 bytes in 1 blocks are definitely lost in loss record 145 of 18,389
==30698== at 0x4A06C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==30698== by 0x8D780AC: g_malloc (gmem.c:97)
==30698== by 0x8D783C5: g_malloc_n (gmem.c:336)
==30698== by 0x8D93B9A: g_strdup (gstrfuncs.c:356)
==30698== by 0x4C9C629: check_cb (goalastfmprovider.c:525)
==30698== by 0x4F16A4E: _call_message_completed_cb (rest-proxy-call.c:698)
==30698== by 0x51A875D: soup_session_process_queue_item (soup-session.c:2106)
==30698== by 0x51A88D7: async_run_queue (soup-session.c:2145)
==30698== by 0x51A89FE: idle_run_queue (soup-session.c:2179)
==30698== by 0x8D72470: g_idle_dispatch (gmain.c:5397)
==30698== by 0x8D6FAB8: g_main_dispatch (gmain.c:3122)
==30698== by 0x8D708FC: g_main_context_dispatch (gmain.c:3737)
https://bugzilla.gnome.org/show_bug.cgi?id=755315
src/goabackend/goalastfmprovider.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/goabackend/goalastfmprovider.c b/src/goabackend/goalastfmprovider.c
index ca728a6..9d04f2c 100644
--- a/src/goabackend/goalastfmprovider.c
+++ b/src/goabackend/goalastfmprovider.c
@@ -225,14 +225,14 @@ lastfm_login_sync (GoaProvider *provider,
json_obj = json_node_get_object (root);
session_obj = json_node_get_object (json_object_get_member (json_obj, "session"));
- if (g_strdup (json_object_get_string_member (session_obj, "name")) == NULL)
+ if (json_object_get_string_member (session_obj, "name") == NULL)
{
g_set_error (error, GOA_ERROR, GOA_ERROR_FAILED, _("Could not parse response"));
goto out;
}
- if (g_strdup (json_object_get_string_member (session_obj, "key")) == NULL)
+ if (json_object_get_string_member (session_obj, "key") == NULL)
{
g_set_error (error, GOA_ERROR, GOA_ERROR_FAILED, _("Could not parse response"));
goto out;
@@ -545,7 +545,7 @@ check_cb (RestProxyCall *call,
}
session_obj = json_node_get_object (session);
- if (g_strdup (json_object_get_string_member (session_obj, "name")) == NULL)
+ if (json_object_get_string_member (session_obj, "name") == NULL)
{
g_set_error (&data->error, GOA_ERROR, GOA_ERROR_FAILED, _("Could not parse response"));
goto out;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]