Author: pschweitzer
Date: Sun Jul 30 08:22:34 2017
New Revision: 75442
URL:
http://svn.reactos.org/svn/reactos?rev=75442&view=rev
Log:
[RXCE]
Don't forget to set RX_CONTEXT_FLAG_FROM_POOL flag when allocating a new RX_CONTEXT
structure from pool.
This avoids leaking it afterwards and exhausting NP pool when using NFS.
CORE-8204
CORE-11327
CORE-13484
CORE-13604
Modified:
trunk/reactos/sdk/lib/drivers/rxce/rxce.c
Modified: trunk/reactos/sdk/lib/drivers/rxce/rxce.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/rxce/rxce.…
==============================================================================
--- trunk/reactos/sdk/lib/drivers/rxce/rxce.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/drivers/rxce/rxce.c [iso-8859-1] Sun Jul 30 08:22:34 2017
@@ -1752,8 +1752,12 @@
return NULL;
}
+ /* Zero it */
+ RtlZeroMemory(Context, sizeof(RX_CONTEXT));
+
+ /* It was allocated on NP pool, keep track of it! */
+ SetFlag(Context->Flags, RX_CONTEXT_FLAG_FROM_POOL);
/* And initialize it */
- RtlZeroMemory(Context, sizeof(RX_CONTEXT));
RxInitializeContext(Irp, RxDeviceObject, InitialContextFlags, Context);
ASSERT((Context->MajorFunction != IRP_MJ_CREATE) ||
!BooleanFlagOn(Context->Flags, RX_CONTEXT_FLAG_MUST_SUCCEED_ALLOCATED));