diff options
author | Leesoo Ahn <yisooan@fedoraproject.org> | 2019-10-09 11:21:15 +0900 |
---|---|---|
committer | Leesoo Ahn <yisooan@fedoraproject.org> | 2019-10-13 14:39:22 +0900 |
commit | e13c85551b724c8a65cfcf98fe858e463fb00f0a (patch) | |
tree | 479959e59103b1fa85a313793798a9184f848b8b | |
parent | 5925221e3f46b269b34f49762c4e90ad52827699 (diff) | |
download | libgfbgraph-e13c85551b724c8a65cfcf98fe858e463fb00f0a.tar.gz |
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
-rw-r--r-- | gfbgraph/gfbgraph-user.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; } |