don't leak resources on failure
Modified: trunk/reactos/ntoskrnl/rtl/capture.c
_____
Modified: trunk/reactos/ntoskrnl/rtl/capture.c
--- trunk/reactos/ntoskrnl/rtl/capture.c 2005-01-22 20:53:14 UTC
(rev 13219)
+++ trunk/reactos/ntoskrnl/rtl/capture.c 2005-01-22 20:59:49 UTC
(rev 13220)
@@ -115,6 +115,13 @@
Status = _SEH_GetExceptionCode();
}
_SEH_END;
+
+ if(!NT_SUCCESS(Status))
+ {
+ ExFreePool(Dest->Buffer);
+ Dest->Buffer = NULL;
+ Dest->Length = Dest->MaximumLength = 0;
+ }
}
else
{
Show replies by date