[gnome-photos/wip/rishi/facebook-leak-authorizer] facebook-item: Don't leak the GFBGraphGoaAuthorizer



commit eaa1a4d671b7d9196d59a3cbd3ce72cf8e4894ce
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 980775a8..0a1e7936 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]