-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathProperlyDeallocateDynamicallyAllocatedResources.ql
More file actions
32 lines (29 loc) · 1.24 KB
/
ProperlyDeallocateDynamicallyAllocatedResources.ql
File metadata and controls
32 lines (29 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* @id cpp/cert/properly-deallocate-dynamically-allocated-resources
* @name MEM51-CPP: Properly deallocate dynamically allocated resources
* @description Deallocation functions should only be called on nullptr or a pointer returned by the
* corresponding allocation function, that hasn't already been deallocated.
* @kind problem
* @precision medium
* @problem.severity error
* @tags external/cert/id/mem51-cpp
* correctness
* security
* external/cert/severity/high
* external/cert/likelihood/likely
* external/cert/remediation-cost/medium
* external/cert/priority/p18
* external/cert/level/l1
* external/cert/obligation/rule
*/
import cpp
import codingstandards.cpp.cert
import codingstandards.cpp.rules.properlydeallocatedynamicallyallocatedresourcesshared.ProperlyDeallocateDynamicallyAllocatedResourcesShared
module ProperlyDeallocateDynamicallyAllocatedResourcesConfig implements
ProperlyDeallocateDynamicallyAllocatedResourcesSharedConfigSig
{
Query getQuery() {
result = AllocationsPackage::properlyDeallocateDynamicallyAllocatedResourcesQuery()
}
}
import ProperlyDeallocateDynamicallyAllocatedResourcesShared<ProperlyDeallocateDynamicallyAllocatedResourcesConfig>