Index: src/vortex_channel.c =================================================================== --- src/vortex_channel.c (revision 4487) +++ src/vortex_channel.c (working copy) @@ -1000,11 +1000,14 @@ /* if piggyback is defined, invoke the frame received * using the piggyback */ if (channel->is_opened && vortex_channel_have_piggyback (channel)) { + axl_bool rpy; /* get the piggyback */ frame = vortex_channel_get_piggyback (channel); /* invoke the frame received */ - vortex_channel_invoke_received_handler (data->connection, channel, frame); + rpy = vortex_channel_invoke_received_handler (data->connection, channel, frame); + if (!rpy) + vortex_frame_unref (frame); } /* unref the channel here */ @@ -5909,7 +5912,6 @@ data = axl_new (ReceivedInvokeData, 1); if (data == NULL) { vortex_log (VORTEX_LEVEL_CRITICAL, "Allocation failed, unable to deliver frame"); - vortex_frame_unref (frame); return axl_false; } data->channel = channel; @@ -5923,7 +5925,6 @@ vortex_log (VORTEX_LEVEL_CRITICAL, "unable to increase connection reference, avoiding delivering data (dropping frame).."); /* deallocate resources */ - vortex_frame_unref (frame); axl_free (data); return axl_false; } Index: src/vortex_profiles.c =================================================================== --- src/vortex_profiles.c (revision 4487) +++ src/vortex_profiles.c (working copy) @@ -920,7 +920,6 @@ vortex_log (VORTEX_LEVEL_CRITICAL, "unable to increase connection reference, avoiding delivering data (dropping frame).."); /* deallocate resources */ - vortex_frame_unref (frame); axl_free (data); return axl_false; }