[gnome-photos/gnome-3-30] facebook-item: Don't leak the GFBGraphGoaAuthorizer



commit 3ce7228d421cbc0f913ffda27b3faccaa435c6f4
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Oct 2 10:21:37 2018 +0200

    facebook-item: Don't leak the GFBGraphGoaAuthorizer
    
    Fallout from e3f3fe436790907e55a4796f70953f951e6d8026
    
    https://gitlab.gnome.org/GNOME/gnome-photos/merge_requests/63

 src/photos-facebook-item.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/photos-facebook-item.c b/src/photos-facebook-item.c
index 33c9efc0..5d7f27df 100644
--- a/src/photos-facebook-item.c
+++ b/src/photos-facebook-item.c
@@ -107,7 +107,7 @@ static GFBGraphPhoto *
 photos_facebook_get_gfbgraph_photo (PhotosBaseItem *item, GCancellable *cancellable, GError **error)
 {
   PhotosFacebookItem *self = PHOTOS_FACEBOOK_ITEM (item);
-  GFBGraphGoaAuthorizer *authorizer;
+  GFBGraphGoaAuthorizer *authorizer = NULL; /* TODO: use g_autoptr */
   GFBGraphPhoto *photo = NULL;
   GoaObject *object;
   PhotosSource *source;
@@ -129,6 +129,7 @@ photos_facebook_get_gfbgraph_photo (PhotosBaseItem *item, GCancellable *cancella
   photo = gfbgraph_photo_new_from_id (GFBGRAPH_AUTHORIZER (authorizer), identifier, error);
 
  out:
+  g_clear_object (&authorizer);
   return photo;
 }
 


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