You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2020/02/21 20:36:01 UTC
[thrift] branch master updated: THRIFT-5102: Fix memory leak in
thrift_simple_server_serve() Client: c_glib Patch: wangyunjian
This is an automated email from the ASF dual-hosted git repository.
jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new ea4a086 THRIFT-5102: Fix memory leak in thrift_simple_server_serve() Client: c_glib Patch: wangyunjian
ea4a086 is described below
commit ea4a086757f834880220c50392532b60751c6885
Author: wangyunjian <wa...@huawei.com>
AuthorDate: Tue Feb 18 09:11:53 2020 -0500
THRIFT-5102: Fix memory leak in thrift_simple_server_serve()
Client: c_glib
Patch: wangyunjian
This closes #2012
Signed-off-by: wangyunjian <wa...@huawei.com>
---
lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.c b/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.c
index 22a96c7..53e2508 100644
--- a/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.c
+++ b/lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.c
@@ -78,6 +78,15 @@ thrift_simple_server_serve (ThriftServer *server, GError **error)
NULL);
THRIFT_TRANSPORT_GET_CLASS (output_transport)->close (output_transport,
NULL);
+ g_object_unref (input_transport);
+ g_object_unref (output_transport);
+ g_object_unref (input_protocol);
+ g_object_unref (output_protocol);
+ }
+
+ if (t != NULL)
+ {
+ g_object_unref (t);
}
}