[PATCH] wininet: Always check if context can be deleted when freeing netconn.
Signed-off-by: Daniel Lehman <dlehman25(a)gmail.com> --- v3: supersedes https://source.winehq.org/patches/data/155145 fixes a memory leak where netcon_secure_connect_setup fails in the call to netconn_verify_cert resulting in netconn->secure being FALSE, so it doesn't get freed in free_netconn --- dlls/wininet/netconnection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index 4ad22177ee..615a43c2be 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -392,9 +392,9 @@ void free_netconn(netconn_t *netconn) heap_free(netconn->extra_buf); netconn->extra_buf = NULL; netconn->extra_len = 0; - if (SecIsValidHandle(&netconn->ssl_ctx)) - DeleteSecurityContext(&netconn->ssl_ctx); } + if (SecIsValidHandle(&netconn->ssl_ctx)) + DeleteSecurityContext(&netconn->ssl_ctx); close_netconn(netconn); heap_free(netconn); -- 2.17.1
Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=45330 Your paranoid android. === debian9 (32 bit WoW report) === wininet: ftp.c:81: Test failed: Expected ERROR_INTERNET_LOGIN_FAILURE, got 12110 ftp.c:112: Test failed: InternetConnect failed : 12110 ftp.c:113: Test failed: ERROR_SUCCESS, got 12110 ftp.c:122: Test failed: Expected ERROR_INTERNET_LOGIN_FAILURE, got 12110 === debian9 (64 bit WoW report) === wininet: ftp.c:81: Test failed: Expected ERROR_INTERNET_LOGIN_FAILURE, got 12110 ftp.c:112: Test failed: InternetConnect failed : 12110 ftp.c:113: Test failed: ERROR_SUCCESS, got 12110 ftp.c:122: Test failed: Expected ERROR_INTERNET_LOGIN_FAILURE, got 12110
wininet: ftp.c:81: Test failed: Expected ERROR_INTERNET_LOGIN_FAILURE, got 12110 ftp.c:112: Test failed: InternetConnect failed : 12110 ftp.c:113: Test failed: ERROR_SUCCESS, got 12110 ftp.c:122: Test failed: Expected ERROR_INTERNET_LOGIN_FAILURE, got 12110
i don't see these when i run on my box
participants (2)
-
Daniel Lehman -
Marvin