static VOID SrvNotifyStateFree( PSRV_CHANGE_NOTIFY_STATE_SMB_V1 pNotifyState ) { if (pNotifyState->pAcb && pNotifyState->pAcb->AsyncCancelContext) { IoDereferenceAsyncCancelContext( &pNotifyState->pAcb->AsyncCancelContext); } if (pNotifyState->pConnection) { SrvConnectionRelease(pNotifyState->pConnection); } if (pNotifyState->pBuffer) { SrvFreeMemory(pNotifyState->pBuffer); } if (pNotifyState->pMutex) { pthread_mutex_destroy(&pNotifyState->mutex); } SrvFreeMemory(pNotifyState); }
static VOID SrvFreeExecContext( IN PSRV_EXEC_CONTEXT pContext ) { SrvMpxTrackerRemoveExecContext(pContext); if (pContext->pProtocolContext) { pContext->pfnFreeContext(pContext->pProtocolContext); } if (pContext->pSmbRequest) { SMBPacketRelease( pContext->pConnection->hPacketAllocator, pContext->pSmbRequest); } if (pContext->pSmbResponse) { SMBPacketRelease( pContext->pConnection->hPacketAllocator, pContext->pSmbResponse); } if (pContext->pInterimResponse) { SMBPacketRelease( pContext->pConnection->hPacketAllocator, pContext->pInterimResponse); } if (pContext->pConnection) { SrvConnectionRelease(pContext->pConnection); } if (pContext->pStatInfo) { SrvStatisticsRelease(pContext->pStatInfo); } if (pContext->pLogContext) { SrvLogContextFree(pContext->pLogContext); } if (pContext->pExecMutex) { pthread_mutex_destroy(&pContext->execMutex); } SrvFreeMemory(pContext); }