fix a bug in ScConnectControlPipe
authorChristoph von Wittich <christoph_vw@reactos.org>
Sun, 9 Dec 2007 18:05:02 +0000 (18:05 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Sun, 9 Dec 2007 18:05:02 +0000 (18:05 +0000)
svn path=/trunk/; revision=31109

reactos/dll/win32/advapi32/service/sctrl.c

index 9511d6c..11824ca 100644 (file)
@@ -247,7 +247,7 @@ ScConnectControlPipe(HANDLE *hPipe)
     dwState = PIPE_READMODE_MESSAGE;
     if (!SetNamedPipeHandleState(*hPipe, &dwState, NULL, NULL))
     {
-        CloseHandle(hPipe);
+        CloseHandle(*hPipe);
         *hPipe = INVALID_HANDLE_VALUE;
         return ERROR_FAILED_SERVICE_CONTROLLER_CONNECT;
     }