You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ro...@apache.org on 2014/05/04 21:53:24 UTC
git commit: THRIFT-2490 c_glib: if fail to read a exception from
server, client may be occurred double free
Repository: thrift
Updated Branches:
refs/heads/master 40f8ce2b4 -> cf0edd365
THRIFT-2490 c_glib: if fail to read a exception from server, client may be occurred double free
Client: c_glib
Patch: Jaesang Kim
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/cf0edd36
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/cf0edd36
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/cf0edd36
Branch: refs/heads/master
Commit: cf0edd365909ae3cc1b6afb12ed69ff6c4e8a147
Parents: 40f8ce2
Author: Roger Meier <ro...@apache.org>
Authored: Sun May 4 21:52:36 2014 +0200
Committer: Roger Meier <ro...@apache.org>
Committed: Sun May 4 21:52:36 2014 +0200
----------------------------------------------------------------------
compiler/cpp/src/generate/t_c_glib_generator.cc | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/cf0edd36/compiler/cpp/src/generate/t_c_glib_generator.cc
----------------------------------------------------------------------
diff --git a/compiler/cpp/src/generate/t_c_glib_generator.cc b/compiler/cpp/src/generate/t_c_glib_generator.cc
index 9e3ac3c..5195224 100644
--- a/compiler/cpp/src/generate/t_c_glib_generator.cc
+++ b/compiler/cpp/src/generate/t_c_glib_generator.cc
@@ -2662,6 +2662,9 @@ void t_c_glib_generator::generate_deserialize_struct(ofstream &out,
indent_up();
if (allocate) {
indent(out) << "g_object_unref (" << prefix << ");" << endl;
+ if (tstruct->is_xception()) {
+ indent(out) << prefix << " = NULL;" << endl;
+ }
}
out <<
indent() << "return " << error_ret << ";" << endl;