[PATCH 2/2, try3] wininet: Fix reference count on internet handle for asynchronous InternetReadFileEx call.

Misha Koshelev mk144210 at bcm.edu
Wed Aug 22 00:12:52 CDT 2007


No changes since sent out in try1.

Without this call to WININET_Release corresponding to the WININET_GetObject at the beginning of
the InternetReadFileEx function is never matched if INTERNET_AsyncCall returns TRUE, and both
this call and the call to WININET_Add right above the top line seen in the diff is never match
if INTERNET_AsyncCall returns FALSE. This means the WININET structure is never properly destroyed,
resulting in a memory leak in any program that uses asynchronous InternetReadFileEx.

This uncovers an existing bug about when the connection is closed (see InternetReadFile_test where
this is already present), and thus necessitates an extra SET_WINE_ALLOW followed by
CHECK_NOT_NOTIFIED with/without todo's.
---
 dlls/wininet/internet.c   |   11 ++++++-----
 dlls/wininet/tests/http.c |   12 ++++++++++++
 2 files changed, 18 insertions(+), 5 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: e67ab2ad35426f9929d55345fcb7d19322cdb5a3.diff
Type: text/x-patch
Size: 2293 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070822/00f51ca6/e67ab2ad35426f9929d55345fcb7d19322cdb5a3.bin


More information about the wine-patches mailing list