From 6ff4db76bdd10cbd712efe95bd2f189536346171 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 22 Sep 2023 14:59:22 +0200 Subject: [PATCH] [server,proxy] fix function pointer type warning --- server/proxy/pf_context.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/proxy/pf_context.c b/server/proxy/pf_context.c index 812fc7338..a84d5fa74 100644 --- a/server/proxy/pf_context.c +++ b/server/proxy/pf_context.c @@ -89,6 +89,12 @@ void StaticChannelContext_free(pServerStaticChannelContext* ctx) free(ctx); } +static void HashStaticChannelContext_free(void* ptr) +{ + pServerStaticChannelContext* ctx = (pServerStaticChannelContext*)ptr; + StaticChannelContext_free(ctx); +} + /* Proxy context initialization callback */ static void client_to_proxy_context_free(freerdp_peer* client, rdpContext* ctx); static BOOL client_to_proxy_context_new(freerdp_peer* client, rdpContext* ctx) @@ -129,7 +135,7 @@ static BOOL client_to_proxy_context_new(freerdp_peer* client, rdpContext* ctx) obj->fnObjectEquals = ChannelId_Compare; obj = HashTable_ValueObject(context->channelsByFrontId); - obj->fnObjectFree = StaticChannelContext_free; + obj->fnObjectFree = HashStaticChannelContext_free; context->channelsByBackId = HashTable_New(FALSE); if (!context->channelsByBackId)