channels/server: Silence false positive warnings from covscan
authorOndrej Holy <oholy@redhat.com>
Tue, 21 Aug 2018 07:11:19 +0000 (09:11 +0200)
committerOndrej Holy <oholy@redhat.com>
Wed, 22 Aug 2018 11:35:43 +0000 (13:35 +0200)
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

index cd3a237..8efff3f 100644 (file)
 
 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);
 }
 
 /**