From: Ondrej Holy Date: Tue, 21 Aug 2018 07:11:19 +0000 (+0200) Subject: channels/server: Silence false positive warnings from covscan X-Git-Tag: 2.0.0-rc4~110^2~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab7ab7a7ce9e1d03881c228f1d8d675975638bb9;p=platform%2Fupstream%2Ffreerdp.git 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. --- 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); } /**