Author: dgorbachev
Date: Fri May 11 18:12:21 2007
New Revision: 26698
URL:
http://svn.reactos.org/svn/reactos?rev=26698&view=rev
Log:
Fix (partially) bug #2243.
Modified:
trunk/reactos/ntoskrnl/lpc/send.c
Modified: trunk/reactos/ntoskrnl/lpc/send.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/send.c?rev=26…
==============================================================================
--- trunk/reactos/ntoskrnl/lpc/send.c (original)
+++ trunk/reactos/ntoskrnl/lpc/send.c Fri May 11 18:12:21 2007
@@ -285,11 +285,26 @@
else
{
/* No callback, just copy the message */
- LpcpMoveMessage(&Message->Request,
- LpcRequest,
- LpcRequest + 1,
- MessageType,
- &Thread->Cid);
+ _SEH_TRY
+ {
+ LpcpMoveMessage(&Message->Request,
+ LpcRequest,
+ LpcRequest + 1,
+ MessageType,
+ &Thread->Cid);
+ }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END;
+
+ if (!NT_SUCCESS(Status))
+ {
+ LpcpFreeToPortZone(Message, 0);
+ ObDereferenceObject(Port);
+ return Status;
+ }
/* Acquire the LPC lock */
KeAcquireGuardedMutex(&LpcpLock);