winex11.drv: clear TLS slot when freeing the data it points to

Dan Kegel dank at
Sat Nov 28 13:23:55 CST 2009

Avoids valgrind warnings like the one in
  Invalid read of size 4
     at  X11DRV_GetKeyboardLayout (keyboard.c:1991)
     by  GetKeyboardLayout (input.c:679)
     by  IMM_DestroyContext (imm.c:679)
     by  IMM_FreeThreadData (imm.c:239)
     by  DllMain (imm.c:389)

I'm scared of TLS slots in general, this one deserves careful review.
- Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-winex11-Clear-TLS-slot-when-freeing-TLS-data.-Avoi.patch
Type: text/x-patch
Size: 1087 bytes
Desc: not available
URL: <>

More information about the wine-patches mailing list