Author: cgutman Date: Fri Sep 19 18:41:28 2008 New Revision: 36335
URL: http://svn.reactos.org/svn/reactos?rev=36335&view=rev Log: - Initialize the callback record before calling KeRegisterBugCheckCallback so NdisMRegisterAdapterShutdownHandler should work now
Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c
Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c URL: http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/netw... ============================================================================== --- branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Fri Sep 19 18:41:28 2008 @@ -1143,7 +1143,6 @@ * ShutdownHandler: Function to call to handle the bugcheck * NOTES: * - I'm not sure about ShutdownContext - * - FIXME - memory leak below */ { PLOGICAL_ADAPTER Adapter = (PLOGICAL_ADAPTER)MiniportHandle; @@ -1164,8 +1163,9 @@ BugcheckContext->ShutdownHandler = ShutdownHandler; BugcheckContext->DriverContext = ShutdownContext;
- /* not sure if this needs to be initialized or not... oh well, it's a leak. */ BugcheckContext->CallbackRecord = ExAllocatePool(NonPagedPool, sizeof(KBUGCHECK_CALLBACK_RECORD)); + + KeInitializeCallbackRecord(BugcheckContext->CallbackRecord);
KeRegisterBugCheckCallback(BugcheckContext->CallbackRecord, NdisIBugcheckCallback, BugcheckContext, sizeof(BugcheckContext), (PUCHAR)"Ndis Miniport");