Unlock console on alternate return paths. Fixes bug 734.
Modified: trunk/reactos/subsys/csrss/win32csr/conio.c
_____
Modified: trunk/reactos/subsys/csrss/win32csr/conio.c
--- trunk/reactos/subsys/csrss/win32csr/conio.c 2005-09-08 14:01:53 UTC
(rev 17741)
+++ trunk/reactos/subsys/csrss/win32csr/conio.c 2005-09-08 15:51:44 UTC
(rev 17742)
@@ -1500,6 +1500,10 @@
NewCursorY < 0 || NewCursorY >= Buff->MaxY)
{
ConioUnlockScreenBuffer(Buff);
+ if (NULL != Console)
+ {
+ ConioUnlockConsole(Console);
+ }
return Request->Status = STATUS_INVALID_PARAMETER;
}
ConioPhysicalToLogical(Buff, Buff->CurrentX, Buff->CurrentY,
&OldCursorX, &OldCursorY);
@@ -1510,6 +1514,10 @@
if (! ConioSetScreenInfo(Console, Buff, OldCursorX, OldCursorY))
{
ConioUnlockScreenBuffer(Buff);
+ if (NULL != Console)
+ {
+ ConioUnlockConsole(Console);
+ }
return Request->Status = STATUS_UNSUCCESSFUL;
}
}
Show replies by date