https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4e07b3b9f9448ff17c636…
commit 4e07b3b9f9448ff17c636bd2de9b72d9f1e403f2
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sun Mar 10 12:27:30 2019 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sun Mar 10 12:27:30 2019 +0100
[AFD] Don't reallocate buffers if windows sizes didn't change
---
drivers/network/afd/afd/info.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/network/afd/afd/info.c b/drivers/network/afd/afd/info.c
index c780eb86a2..78e0cb0851 100644
--- a/drivers/network/afd/afd/info.c
+++ b/drivers/network/afd/afd/info.c
@@ -128,7 +128,8 @@ AfdSetInfo( PDEVICE_OBJECT DeviceObject, PIRP Irp,
FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS)
{
/* FIXME: likely not right, check tcpip.sys for
TDI_QUERY_MAX_DATAGRAM_INFO */
- if (InfoReq->Information.Ulong > 0 &&
InfoReq->Information.Ulong < 0xFFFF)
+ if (InfoReq->Information.Ulong > 0 &&
InfoReq->Information.Ulong < 0xFFFF &&
+ InfoReq->Information.Ulong != FCB->Recv.Size)
{
NewBuffer = ExAllocatePoolWithTag(PagedPool,
InfoReq->Information.Ulong,
@@ -172,7 +173,8 @@ AfdSetInfo( PDEVICE_OBJECT DeviceObject, PIRP Irp,
if (FCB->State == SOCKET_STATE_CONNECTED ||
FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS)
{
- if (InfoReq->Information.Ulong > 0 &&
InfoReq->Information.Ulong < 0xFFFF)
+ if (InfoReq->Information.Ulong > 0 &&
InfoReq->Information.Ulong < 0xFFFF &&
+ InfoReq->Information.Ulong != FCB->Send.Size)
{
NewBuffer = ExAllocatePoolWithTag(PagedPool,
InfoReq->Information.Ulong,