Commit in reactos/lib/rosrtl/thread on MAIN
priv.c+6-11.1 -> 1.2
little fix

reactos/lib/rosrtl/thread
priv.c 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- priv.c	11 Aug 2004 08:28:13 -0000	1.1
+++ priv.c	11 Aug 2004 08:32:48 -0000	1.2
@@ -73,13 +73,18 @@
     LocalFree((HLOCAL)privs);
     
     /* Perform the impersonation */
-    Ret = SetThreadToken(NULL, hToken);
+    Ret = SetThreadToken(NULL, hNewToken);
     
     if(Ret)
     {
       /* only copy the previous token handle on success */
       *hPreviousToken = hToken;
     }
+    else
+    {
+      /* We don't return the previous token handle on failure, so close it here */
+      CloseHandle(hToken);
+    }
     
     /* We don't need the handle to the new token anymore */
     CloseHandle(hNewToken);
CVSspam 0.2.8