[PATCH] wininet/tests: Fix memory leak.

Andrey Gusev andrey.goosev at gmail.com
Fri Jan 19 05:10:35 CST 2018


Signed-off-by: Andrey Gusev <andrey.goosev at gmail.com>
---
 dlls/wininet/tests/internet.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c
index dd15a4b8a0..a07d7a11d8 100644
--- a/dlls/wininet/tests/internet.c
+++ b/dlls/wininet/tests/internet.c
@@ -1236,6 +1236,8 @@ static void test_Option_PerConnectionOption(void)
     ok(ret == TRUE, "InternetQueryOption should've succeeded\n");
     orig_settings = list.pOptions;
 
+    HeapFree(GetProcessHeap(), 0, list.pOptions);
+
     /* set the global IE proxy server */
     list.dwOptionCount = 2;
     list.pOptions = HeapAlloc(GetProcessHeap(), 0, 2 * sizeof(INTERNET_PER_CONN_OPTIONW));
@@ -1364,6 +1366,8 @@ static void test_Option_PerConnectionOptionA(void)
     ok(ret == TRUE, "InternetQueryOption should've succeeded\n");
     orig_settings = list.pOptions;
 
+    HeapFree(GetProcessHeap(), 0, list.pOptions);
+
     /* set the global IE proxy server */
     list.dwOptionCount = 2;
     list.pOptions = HeapAlloc(GetProcessHeap(), 0, 2 * sizeof(INTERNET_PER_CONN_OPTIONA));
-- 
2.13.6




More information about the wine-devel mailing list