diff options
author | wangyunjian <wangyunjian@huawei.com> | 2020-02-18 09:11:53 -0500 |
---|---|---|
committer | Jens Geyer <jensg@apache.org> | 2020-02-21 21:35:39 +0100 |
commit | ea4a086757f834880220c50392532b60751c6885 (patch) | |
tree | d93055380b3b0cc1e1338cafb2df5f72e4645685 /lib/c_glib | |
parent | bd26d385693e4f172c348dc27f9d1e23288c50cf (diff) | |
download | thrift-ea4a086757f834880220c50392532b60751c6885.tar.gz |
THRIFT-5102: Fix memory leak in thrift_simple_server_serve()
Client: c_glib
Patch: wangyunjian
This closes #2012
Signed-off-by: wangyunjian <wangyunjian@huawei.com>
Diffstat (limited to 'lib/c_glib')
-rw-r--r-- | lib/c_glib/src/thrift/c_glib/server/thrift_simple_server.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 22a96c7a4..53e2508f7 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); } } |