[Spice-devel] [linux-vdagent PATCH v1 2/2] vdagentd: fixes small leak
Victor Toso
lists at victortoso.com
Tue Sep 15 01:47:57 PDT 2015
Hi,
On Tue, Sep 15, 2015 at 10:39:31AM +0200, Victor Toso wrote:
> This correctly fixes the leak from reverted patch
> 4835df0b642dfc963e7
>
> ==2648== HEAP SUMMARY:
> ==2648== in use at exit: 104,699 bytes in 1,459 blocks
> ==2648== total heap usage: 14,177 allocs, 12,718 frees, 1,190,456 bytes allocated
> ==2648==
> ==2648== 16 bytes in 1 blocks are definitely lost in loss record 16 of 130
> ==2648== at 0x4C29BCF: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==2648== by 0x10B530: agent_read_complete (vdagentd.c:715)
> ==2648== by 0x10E8DC: udscs_read_complete (udscs.c:460)
> ==2648== by 0x10EAFC: udscs_do_read (udscs.c:515)
> ==2648== by 0x10E490: udscs_client_handle_fds (udscs.c:349)
> ==2648== by 0x10E402: udscs_server_handle_fds (udscs.c:337)
> ==2648== by 0x10BAB1: main_loop (vdagentd.c:844) ==2648== by 0x10A3E6: main (vdagentd.c:974)
Joined lines by mistake, fixed locally -------------------^
> ==2648==
> ==2648== LEAK SUMMARY:
> ==2648== definitely lost: 16 bytes in 1 blocks
> ==2648== indirectly lost: 0 bytes in 0 blocks
> ==2648== possibly lost: 41,483 bytes in 1,268 blocks
> ==2648== still reachable: 63,200 bytes in 190 blocks
> ==2648== suppressed: 0 bytes in 0 blocks
> ==2648== Reachable blocks (those to which a pointer was found) are not shown.
> ==2648== To see them, rerun with: --leak-check=full --show-leak-kinds=all
> ---
> src/vdagentd.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/vdagentd.c b/src/vdagentd.c
> index 14c5be1..8f7ab85 100644
> --- a/src/vdagentd.c
> +++ b/src/vdagentd.c
> @@ -687,6 +687,7 @@ void agent_disconnect(struct udscs_connection *conn)
> agent_data->session = NULL;
> update_active_session_connection(NULL);
>
> + free(agent_data->screen_info);
> free(agent_data);
> }
>
> --
> 2.4.3
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
More information about the Spice-devel
mailing list