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/07/01 21:19:04 UTC

[thrift] branch master updated: THRIFT-5118: Fix memory leak when the handler method return a exception 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 761a869  THRIFT-5118: Fix memory leak when the handler method return a exception Client: c_glib Patch: wangyunjian
761a869 is described below

commit 761a869e0508d2cf7975b040a6da54ae62a889b6
Author: wangyunjian <wa...@huawei.com>
AuthorDate: Thu Feb 27 00:02:19 2020 +0800

    THRIFT-5118: Fix memory leak when the handler method return a exception
    Client: c_glib
    Patch: wangyunjian
    
    This closes #2035
    
    Signed-off-by: wangyunjian <wa...@huawei.com>
---
 compiler/cpp/src/thrift/generate/t_c_glib_generator.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/compiler/cpp/src/thrift/generate/t_c_glib_generator.cc b/compiler/cpp/src/thrift/generate/t_c_glib_generator.cc
index fb45dfa..2a92183 100644
--- a/compiler/cpp/src/thrift/generate/t_c_glib_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_c_glib_generator.cc
@@ -2445,6 +2445,7 @@ void t_c_glib_generator::generate_service_processor(t_service* tservice) {
         f_service_ << args_indent << "\"" << (*xception_iter)->get_name() << "\", "
                    << (*xception_iter)->get_name() << "," << endl << args_indent << "NULL);" << endl
                    << endl;
+        f_service_ << indent() << "g_object_unref ("<< (*xception_iter)->get_name() <<");"<< endl;
         f_service_ << indent() << "result =" << endl;
         indent_up();
         f_service_ << indent() << "((thrift_protocol_write_message_begin (output_protocol," << endl;