Github user gadLinux commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1200#discussion_r102326250
--- Diff: lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c ---
@@ -61,15 +61,15 @@ thrift_protocol_set_property (GObject *object, guint
property_id,
switch (property_id)
{
case PROP_THRIFT_PROTOCOL_TRANSPORT:
- protocol->transport = g_value_get_object (value);
--- End diff --
Why you duplicate it? The underlaying transport should live as long as the
multiplexed one. And must be destroyed after protocol is destroyed. Duplicating
the transport may lead to object references hold and maybe memory freeing
problems.
I think this property must hold a reference to it and not a copy.
The copy can lead to memory freeing problems.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---