First use "ptr", then set it to NULL
Modified: trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c

Modified: trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c
--- trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c	2005-10-17 15:59:23 UTC (rev 18523)
+++ trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c	2005-10-17 16:59:31 UTC (rev 18524)
@@ -1296,7 +1296,6 @@
                     {
                       PEPROCESS DbgProcess = NULL;
 
-                      ptr = NULL;
                       if (NULL != GspDbgThread &&
                           PsGetCurrentProcess() != GspDbgThread->ThreadsProcess)
                         {
@@ -1318,6 +1317,7 @@
                         {
                           strcpy(GspOutBuffer, "OK");
                         }
+                      ptr = NULL;
                     }
                 }