[PATCH 1/3] urlmon: Don't free structures that are used by asynchronous HttpSendRequest until we are sure they won't be used.

Misha Koshelev mk144210 at bcm.edu
Wed Jul 25 23:58:37 CDT 2007


A big thanks to Alexandre for pointing out occasional problems in two of my tests and helping me to think
of what they could be due to. This patchset fixes these problems. The order of the patchset is meant
to cause "minimal damage" if only one patch is implied, but if you'd like to see the failure that this
patch is meant to fix happen fairly consistently rather than occasionally, apply the second patch first (in
that case you will see that the first patch clearly fixes it).

This patch fixes an occasional:
protocol.c:406: Test failed: Read 6 bytes instead of 13

Actually quite a dumb mistake on my part caused by my patchset committed on Monday. HttpSendRequest
is asynchronous (as should have been very clear to me from the fact that it returns FALSE with last
error ERROR_IO_PENDING), and this problem actually arises from the fact that I freed both the full_header
and actual POST string that is sent (hglobal in stgmedium in bindinfo) right after calling HttpSendRequest,
even though I also knew that native seems to free the stgmedium when Terminate is called or even @ Release
time. In any case, this patch fixes when the full_header and bindinfo are freed to solve the problem.

---
 dlls/urlmon/http.c |   68 +++++++++++++++++++++++++++++++--------------------
 1 files changed, 41 insertions(+), 27 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 332b70ceeb6e36767d1a56c03e38c0191658659a.diff
Type: text/x-patch
Size: 7925 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070725/835f1eed/332b70ceeb6e36767d1a56c03e38c0191658659a.bin


More information about the wine-patches mailing list