From ab7ab7a7ce9e1d03881c228f1d8d675975638bb9 Mon Sep 17 00:00:00 2001 From: Ondrej Holy Date: Tue, 21 Aug 2018 09:11:19 +0200 Subject: [PATCH] channels/server: Silence false positive warnings from covscan Change the code a bit to silence false positive warnings from covscan. leaked_storage: Ignoring storage allocated by "audin_server_context_new(NULL)" leaks it. leaked_storage: Ignoring storage allocated by "rdpsnd_server_context_new(NULL)" leaks it. leaked_storage: Ignoring storage allocated by "cliprdr_server_context_new(NULL)" leaks it. leaked_storage: Ignoring storage allocated by "echo_server_context_new(NULL)" leaks it. leaked_storage: Ignoring storage allocated by "rdpdr_server_context_new(NULL)" leaks it. leaked_storage: Ignoring storage allocated by "drdynvc_server_context_new(NULL)" leaks it. leaked_storage: Ignoring storage allocated by "rdpei_server_context_new(NULL)" leaks it. leaked_storage: Ignoring storage allocated by "remdesk_server_context_new(NULL)" leaks it. leaked_storage: Ignoring storage allocated by "encomsp_server_context_new(NULL)" leaks it. leaked_storage: Ignoring storage allocated by "rdpgfx_server_context_new(NULL)" leaks it. --- channels/server/channels.c | 50 +++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/channels/server/channels.c b/channels/server/channels.c index cd3a237..8efff3f 100644 --- a/channels/server/channels.c +++ b/channels/server/channels.c @@ -53,26 +53,36 @@ void freerdp_channels_dummy() { - audin_server_context_new(NULL); - audin_server_context_free(NULL); - rdpsnd_server_context_new(NULL); - rdpsnd_server_context_free(NULL); - cliprdr_server_context_new(NULL); - cliprdr_server_context_free(NULL); - echo_server_context_new(NULL); - echo_server_context_free(NULL); - rdpdr_server_context_new(NULL); - rdpdr_server_context_free(NULL); - drdynvc_server_context_new(NULL); - drdynvc_server_context_free(NULL); - rdpei_server_context_new(NULL); - rdpei_server_context_free(NULL); - remdesk_server_context_new(NULL); - remdesk_server_context_free(NULL); - encomsp_server_context_new(NULL); - encomsp_server_context_free(NULL); - rdpgfx_server_context_new(NULL); - rdpgfx_server_context_free(NULL); + audin_server_context* audin; + RdpsndServerContext* rdpsnd; + CliprdrServerContext* cliprdr; + echo_server_context* echo; + RdpdrServerContext* rdpdr; + DrdynvcServerContext* drdynvc; + RdpeiServerContext* rdpei; + RemdeskServerContext* remdesk; + EncomspServerContext* encomsp; + RdpgfxServerContext* rdpgfx; + audin = audin_server_context_new(NULL); + audin_server_context_free(audin); + rdpsnd = rdpsnd_server_context_new(NULL); + rdpsnd_server_context_free(rdpsnd); + cliprdr = cliprdr_server_context_new(NULL); + cliprdr_server_context_free(cliprdr); + echo = echo_server_context_new(NULL); + echo_server_context_free(echo); + rdpdr = rdpdr_server_context_new(NULL); + rdpdr_server_context_free(rdpdr); + drdynvc = drdynvc_server_context_new(NULL); + drdynvc_server_context_free(drdynvc); + rdpei = rdpei_server_context_new(NULL); + rdpei_server_context_free(rdpei); + remdesk = remdesk_server_context_new(NULL); + remdesk_server_context_free(remdesk); + encomsp = encomsp_server_context_new(NULL); + encomsp_server_context_free(encomsp); + rdpgfx = rdpgfx_server_context_new(NULL); + rdpgfx_server_context_free(rdpgfx); } /** -- 2.7.4