MCPcopy Create free account
hub / github.com/D4stiny/PeaceMaker / ~AlertQueue

Method ~AlertQueue

PeaceMaker Kernel/AlertQueue.cpp:24–47  ·  view source on GitHub ↗

Clear the queue of alerts. */

Source from the content-addressed store, hash-verified

22 Clear the queue of alerts.
23*/
24AlertQueue::~AlertQueue()
25{
26 PLIST_ENTRY currentEntry;
27 KIRQL oldIRQL;
28
29 //
30 // Make sure no one is doing operations on the AlertQueue.
31 //
32 this->destroying = TRUE;
33
34 KeAcquireSpinLock(this->alertsLock, &oldIRQL);
35 KeReleaseSpinLock(this->alertsLock, oldIRQL);
36
37 while (IsListEmpty(RCAST<PLIST_ENTRY>(&this->alertsHead)) == FALSE)
38 {
39 currentEntry = RemoveHeadList(RCAST<PLIST_ENTRY>(&this->alertsHead));
40 //
41 // Free the entry.
42 //
43 ExFreePoolWithTag(SCAST<PVOID>(currentEntry), ALERT_QUEUE_ENTRY_TAG);
44 }
45
46 ExFreePoolWithTag(this->alertsLock, ALERT_LOCK_TAG);
47}
48
49/**
50 Push an alert to the queue.

Callers 1

~DetectionLogicMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected