[2/2] wininet: Free per-thread error info upon exit from an async procedure.
hans at codeweavers.com
Mon Dec 21 07:42:55 CST 2009
On Monday 21 December 2009 13:09:05 Jacek Caban wrote:
> You have to set TLS value to NULL otherwise it will crash on next
> INTERNET_SetLastError in the same thread on another async call. But the
Thanks for catching that.
> right way to fix this is to get rid of INTERNET_[GS]etLastError. This is
> useless and has proven to result in code that has many failure paths
> without last error set. I've already removed most of these calls and I'm
> near to getting rid of all of them except ones in ftp.c.
Well, InternetGetLastResponseInfo depends on the per-thread error info and
it may get called (from a callback) on an async thread, so I'd say we do
need to free the TLS value after the async call is done.
More information about the wine-devel