From abec5822455c76d353e40d5e2748ddce7c5219d9 Mon Sep 17 00:00:00 2001 From: Victor Toso Date: Wed, 23 Mar 2016 15:40:50 +0100 Subject: [PATCH 5/5] channel-main: fix leak on volume-sync 7 bytes in 1 blocks are definitely lost in loss record 128 of 10,009 at 0x4C2A988: calloc (vg_replace_malloc.c:711) by 0xB6C3200: g_malloc0 (gmem.c:124) by 0x740BD5F: audio_playback_volume_info_cb (channel-main.c:1216) by 0xB11D488: g_task_return_now (gtask.c:1107) by 0xB11DCBD: g_task_return (gtask.c:1165) by 0x742D1F5: spice_pulse_complete_all_async_tasks (spice-pulse.c:1034) by 0x8B6B57C: ext_stream_restore_read_cb (ext-stream-restore.c:141) by 0x10BA63C0: run_action (pdispatch.c:284) by 0x10BA6722: pa_pdispatch_run (pdispatch.c:337) by 0x8B6520D: pstream_packet_callback (context.c:338) by 0x10BA8D7E: do_read (pstream.c:879) by 0x10BAB39A: do_pstream_read_write (pstream.c:189) 7 bytes in 1 blocks are definitely lost in loss record 129 of 10,009 at 0x4C2A988: calloc (vg_replace_malloc.c:711) by 0xB6C3200: g_malloc0 (gmem.c:124) by 0x740BFBF: audio_record_volume_info_cb (channel-main.c:1273) by 0xB11D488: g_task_return_now (gtask.c:1107) by 0xB11DCBD: g_task_return (gtask.c:1165) by 0x742D1F5: spice_pulse_complete_all_async_tasks (spice-pulse.c:1034) by 0x8B6B57C: ext_stream_restore_read_cb (ext-stream-restore.c:141) by 0x10BA63C0: run_action (pdispatch.c:284) by 0x10BA6722: pa_pdispatch_run (pdispatch.c:337) by 0x8B6520D: pstream_packet_callback (context.c:338) by 0x10BA8D7E: do_read (pstream.c:879) by 0x10BAB39A: do_pstream_read_write (pstream.c:189) Acked-by: Christophe Fergeau (cherry picked from commit e47075093d5d78b05a2b34fa7aee43dd6818f6ab) --- src/channel-main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/channel-main.c b/src/channel-main.c index 67fce5b..2ad1ece 100644 --- a/src/channel-main.c +++ b/src/channel-main.c @@ -1234,6 +1234,7 @@ static void audio_playback_volume_info_cb(GObject *object, GAsyncResult *res, gp g_free(volume); agent_msg_queue(main_channel, VD_AGENT_AUDIO_VOLUME_SYNC, sizeof(VDAgentAudioVolumeSync) + array_size, avs); + g_free (avs); } static void agent_sync_audio_playback(SpiceMainChannel *main_channel) @@ -1291,6 +1292,7 @@ static void audio_record_volume_info_cb(GObject *object, GAsyncResult *res, gpoi g_free(volume); agent_msg_queue(main_channel, VD_AGENT_AUDIO_VOLUME_SYNC, sizeof(VDAgentAudioVolumeSync) + array_size, avs); + g_free (avs); } static void agent_sync_audio_record(SpiceMainChannel *main_channel) -- 2.8.1