From: kubistika Date: Mon, 13 May 2019 08:11:24 +0000 (+0300) Subject: server/proxy: Fix free invalid memory when pf_server_parse_target_from_routing_token... X-Git-Tag: 2.0.0~455^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7477ac19a711a37441214deeabd19db1d8d04614;p=platform%2Fupstream%2Ffreerdp.git server/proxy: Fix free invalid memory when pf_server_parse_target_from_routing_token fails --- diff --git a/server/proxy/pf_context.c b/server/proxy/pf_context.c index 8f45cf2..c64c80e 100644 --- a/server/proxy/pf_context.c +++ b/server/proxy/pf_context.c @@ -90,14 +90,14 @@ static void pf_context_connection_info_free(connectionInfo* info) proxyData* pf_context_proxy_data_new() { - proxyData* pdata = malloc(sizeof(proxyData)); + proxyData* pdata = calloc(1, sizeof(proxyData)); if (pdata == NULL) { return NULL; } - pdata->info = malloc(sizeof(connectionInfo)); + pdata->info = calloc(1, sizeof(connectionInfo)); if (pdata->info == NULL) {