winhttp: Fix a typo to properly release connection handle
authorMartin Willi <martin@revosec.ch>
Thu, 19 Jun 2014 09:09:20 +0000 (11:09 +0200)
committerMartin Willi <martin@revosec.ch>
Thu, 19 Jun 2014 09:09:20 +0000 (11:09 +0200)
Fixes a rather large memory leak in HTTP fetches.

src/libstrongswan/plugins/winhttp/winhttp_fetcher.c

index 4a822bd..6ab8662 100644 (file)
@@ -280,7 +280,7 @@ METHOD(fetcher_t, fetch, status_t,
                        {
                                DBG1(DBG_LIB, "opening request failed: %u", GetLastError());
                        }
-                       WinHttpCloseHandle(connect);
+                       WinHttpCloseHandle(connection);
                }
                else
                {