urlmon: Release IInternetProtocolSink and BindInfo on request handle closure, not on first handle closure.
mk144210 at bcm.edu
Sun Nov 11 00:56:12 CST 2007
Started looking at Dan's valgrind log to find how native binding.c stores the PROTOCOLDATA (I have a hunch)
and noticed that HttpProtocol_Start was crashing (caused by a patch I added a few patches back to fix
a race and not being connected to the Internet, I think there is a wininet inconsistency in there too
but in any case native urlmon with our wininet in the same situation does not crash).
Crash was caused by the protocol_sink member being set to zero when the very first HANDLE_CLOSING was
sent, which was the connect handle. Then when we tried to use it later to inform caller of result it
was obviously invalid. Native only releases IInternetProtocolSink (well the first time, it adds it
twice, which we don't mimic) and BindInfo (traced through looking for ReleaseStgMedium in +relay logs) on
request handle closure specifically (definitively traced by modifying wininet not to send HANDLE_CLOSING
for one or the other and looking at these closures), so we mimick this. Since HANDLE_CLOSING should not
be sent at other times before we call ReportResult (only after when we call HTTPPROTOCOL_Close) in Start,
I believe this is proper fix.
dlls/urlmon/http.c | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1785 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071111/cbd53135/attachment-0001.bin
More information about the wine-patches