[gnome-online-accounts/gnome-3-16] providers: Fix JsonParser leaks
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/gnome-3-16] providers: Fix JsonParser leaks
- Date: Wed, 9 Sep 2015 12:38:58 +0000 (UTC)
commit b8a04f3bfa22e077506fe8d42bb7829c13a57f99
Author: Christophe Fergeau <cfergeau redhat com>
Date: Thu Jul 23 23:33:05 2015 +0200
providers: Fix JsonParser leaks
After creating a JsonParser with json_parser_new(), its memory must be
released with g_object_unref().
https://bugzilla.gnome.org/show_bug.cgi?id=752939
src/goabackend/goaflickrprovider.c | 1 +
src/goabackend/goagoogleprovider.c | 1 +
src/goabackend/goaoauth2provider.c | 1 +
src/goabackend/goawindowsliveprovider.c | 1 +
4 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/goabackend/goaflickrprovider.c b/src/goabackend/goaflickrprovider.c
index ce69de1..cc664e9 100644
--- a/src/goabackend/goaflickrprovider.c
+++ b/src/goabackend/goaflickrprovider.c
@@ -254,6 +254,7 @@ get_identity_sync (GoaOAuthProvider *oauth_provider,
}
out:
+ g_clear_object (&parser);
g_clear_error (&identity_error);
g_clear_object (&call);
g_clear_object (&proxy);
diff --git a/src/goabackend/goagoogleprovider.c b/src/goabackend/goagoogleprovider.c
index 50c4806..1118625 100644
--- a/src/goabackend/goagoogleprovider.c
+++ b/src/goabackend/goagoogleprovider.c
@@ -257,6 +257,7 @@ get_identity_sync (GoaOAuth2Provider *oauth2_provider,
*out_presentation_identity = g_strdup (ret); /* for now: use email as presentation identity */
out:
+ g_clear_object (&parser);
g_clear_error (&identity_error);
g_clear_object (&call);
g_clear_object (&proxy);
diff --git a/src/goabackend/goaoauth2provider.c b/src/goabackend/goaoauth2provider.c
index 0d039ad..32167eb 100644
--- a/src/goabackend/goaoauth2provider.c
+++ b/src/goabackend/goaoauth2provider.c
@@ -739,6 +739,7 @@ get_tokens_sync (GoaOAuth2Provider *provider,
GOA_ERROR,
GOA_ERROR_FAILED,
_("Could not parse response"));
+ g_object_unref (parser);
goto out;
}
/* refresh_token is optional... */
diff --git a/src/goabackend/goawindowsliveprovider.c b/src/goabackend/goawindowsliveprovider.c
index cbc2b58..d5424d2 100644
--- a/src/goabackend/goawindowsliveprovider.c
+++ b/src/goabackend/goawindowsliveprovider.c
@@ -241,6 +241,7 @@ get_identity_sync (GoaOAuth2Provider *oauth2_provider,
}
out:
+ g_clear_object (&parser);
g_clear_error (&identity_error);
g_clear_object (&call);
g_clear_object (&proxy);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]