Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions network/ndis/ndisprot/6x/sys/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ndisprotAuditAllocMem(
)
{
PVOID pBuffer;
PNPROTD_ALLOCATION pAllocInfo;
PNPROTD_ALLOCATION pAllocInfo = NULL;

if (!ndisprotdInitDone)
{
Expand Down Expand Up @@ -88,7 +88,7 @@ ndisprotAuditAllocMem(
ndisprotdMemoryTail->Next = pAllocInfo;
}
ndisprotdMemoryTail = pAllocInfo;

ndisprotdAllocCount++;
NdisReleaseSpinLock(&(ndisprotdMemoryLock));
}
Expand Down Expand Up @@ -295,9 +295,9 @@ ndisprotFreeDbgLock(
VOID
)
{

ASSERT(ndisprotdSpinLockInitDone == 1);

ndisprotdSpinLockInitDone = 0;
NdisFreeSpinLock(&(ndisprotdLockLock));
}
Expand Down
2 changes: 1 addition & 1 deletion network/ndis/ndisprot/6x/sys/ndisbind.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Return Value:
--*/
{
PNDISPROT_OPEN_CONTEXT pOpenContext;
PNDISPROT_OPEN_CONTEXT pOpenContext = NULL;
NDIS_STATUS Status;

UNREFERENCED_PARAMETER(ProtocolDriverContext);
Expand Down
1 change: 1 addition & 0 deletions network/ndis/ndisprot/6x/test/prottest.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ GetSrcMac(
BytesReturned));

#pragma warning(suppress:6202) // buffer overrun warning - enough space allocated in QueryBuffer
// codeql[cpp/buffer-overflow]
memcpy(pSrcMacAddr, pQueryOid->Data, MAC_ADDR_LEN);
}
else
Expand Down
2 changes: 1 addition & 1 deletion network/ndis/ndisprot_kmdf/60/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ndisprotAuditAllocMem(
)
{
PVOID pBuffer;
PNPROTD_ALLOCATION pAllocInfo;
PNPROTD_ALLOCATION pAllocInfo = NULL;

if (!ndisprotdInitDone)
{
Expand Down
13 changes: 8 additions & 5 deletions network/ndis/ndisprot_kmdf/60/ndisbind.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,17 @@ Routine Description:

Arguments:

ProtocolDriverContext - handle to the protocol driver context
BindContext - handle to the bind context provided by NDIS
BindParameters - parameters describing the adapter to which we are binding

Return Value:

None
NDIS_STATUS_SUCCESS if successful, failure code otherwise.

--*/
{
PNDISPROT_OPEN_CONTEXT pOpenContext;
PNDISPROT_OPEN_CONTEXT pOpenContext = NULL;
NDIS_STATUS Status;
WDF_IO_QUEUE_CONFIG queueConfig;
NTSTATUS ntStatus;
Expand Down Expand Up @@ -1334,9 +1337,9 @@ Return Value:
while (FALSE);

DEBUGP(DL_LOUD, ("ValidateOpenAndDoReq: Open %p/%x, OID %x, Status %x\n",
pOpenContext,
pOpenContext == NULL ? 0 : pOpenContext->Flags,
Oid,
pOpenContext,
pOpenContext == NULL ? 0 : pOpenContext->Flags,
Oid,
Status));

return (Status);
Expand Down
Loading