ntdll: Fix possible dereference of a null pointer (clang)

André Hentschel nerv at dawncrow.de
Sun Jul 17 07:26:12 CDT 2011


---
 dlls/ntdll/signal_i386.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index 6c8e8e2..19b6588 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -2171,7 +2171,7 @@ void signal_free_thread( TEB *teb )
     struct ntdll_thread_data *thread_data = (struct ntdll_thread_data *)teb->SpareBytes1;
 
     if (thread_data) wine_ldt_free_fs( thread_data->fs );
-    if (teb->DeallocationStack)
+    if (teb && teb->DeallocationStack)
     {
         size = 0;
         NtFreeVirtualMemory( GetCurrentProcess(), &teb->DeallocationStack, &size, MEM_RELEASE );
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list