From e13c85551b724c8a65cfcf98fe858e463fb00f0a Mon Sep 17 00:00:00 2001 From: Leesoo Ahn Date: Wed, 9 Oct 2019 11:21:15 +0900 Subject: user: Fix memory leak RestProxyCall instance and private properties must be freed after it is done. https://developer.gnome.org/rest/unstable/RestProxy.html#rest-proxy-new-call https://gitlab.gnome.org/GNOME/libgfbgraph/issues/3 --- gfbgraph/gfbgraph-user.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gfbgraph/gfbgraph-user.c b/gfbgraph/gfbgraph-user.c index 34410b3..17a0241 100644 --- a/gfbgraph/gfbgraph-user.c +++ b/gfbgraph/gfbgraph-user.c @@ -120,6 +120,11 @@ gfbgraph_user_class_init (GFBGraphUserClass *klass) static void gfbgraph_user_finalize (GObject *obj) { + GFBGraphUserPrivate *priv = GFBGRAPH_USER_GET_PRIVATE (obj); + + g_free (priv->name); + g_free (priv->email); + G_OBJECT_CLASS(parent_class)->finalize (obj); } @@ -281,6 +286,7 @@ gfbgraph_user_get_me (GFBGraphAuthorizer *authorizer, GError **error) g_object_unref (parser); } + g_object_unref (rest_call); return me; } -- cgit v1.2.1