Fixed memory leak in test
authorakallabeth <akallabeth@posteo.net>
Mon, 18 May 2020 06:10:42 +0000 (08:10 +0200)
committerakallabeth <akallabeth@posteo.net>
Mon, 18 May 2020 15:10:01 +0000 (17:10 +0200)
(cherry picked from commit 2d630cccf7b1e566f99b74a224805fc25f85d6c1)

libfreerdp/core/test/TestConnect.c

index 3f79fa0..7bf1969 100644 (file)
@@ -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);