From 55b7fc50e01ac2c9fb18e926368ae46c23d71e08 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Mon, 18 May 2020 08:10:42 +0200 Subject: [PATCH] Fixed memory leak in test --- libfreerdp/core/test/TestConnect.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libfreerdp/core/test/TestConnect.c b/libfreerdp/core/test/TestConnect.c index 3f79fa03e..7bf196951 100644 --- a/libfreerdp/core/test/TestConnect.c +++ b/libfreerdp/core/test/TestConnect.c @@ -180,6 +180,8 @@ static int testSuccess(int port) path = GetCombinedPath(exe, "Sample"); wpath = GetCombinedPath(wexe, "Sample"); + free(exe); + exe = NULL; if (!path || !wpath) goto fail; @@ -226,6 +228,7 @@ static int testSuccess(int port) fail: free(exe); + free(wexe); free(path); free(wpath); free(commandLine);