[gnome-online-accounts] Fix a life-cycle issue in the oauth2 provider
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] Fix a life-cycle issue in the oauth2 provider
- Date: Mon, 13 Oct 2014 15:11:00 +0000 (UTC)
commit a251f21e1685264f964ac1775c315932b15feafa
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Oct 10 14:21:31 2014 -0400
Fix a life-cycle issue in the oauth2 provider
When calling g_propagate_error on an error, the src becomes invalid,
but you have to clear your pointer yourself, if you want to keep
using it.
https://bugzilla.gnome.org/show_bug.cgi?id=737549
src/goabackend/goaoauth2provider.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/goabackend/goaoauth2provider.c b/src/goabackend/goaoauth2provider.c
index c81949c..a2cd347 100644
--- a/src/goabackend/goaoauth2provider.c
+++ b/src/goabackend/goaoauth2provider.c
@@ -1259,7 +1259,10 @@ goa_oauth2_provider_add_account (GoaProvider *_provider,
* eg., if we failed to store the credentials in the keyring.
*/
if (priv->error != NULL)
- g_propagate_error (error, priv->error);
+ {
+ g_propagate_error (error, priv->error);
+ priv->error = NULL;
+ }
else
g_assert (ret != NULL);
@@ -1352,7 +1355,10 @@ goa_oauth2_provider_refresh_account (GoaProvider *_provider,
out:
if (priv->error != NULL)
- g_propagate_error (error, priv->error);
+ {
+ g_propagate_error (error, priv->error);
+ priv->error = NULL;
+ }
gtk_widget_destroy (dialog);
return ret;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]