Skip to content

Commit e643526

Browse files
committed
Convert OnlyFreeMemoryAllocatedDynamicallyShared to the new dataflow library
1 parent ca1667f commit e643526

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

c/common/test/rules/onlyfreememoryallocateddynamicallyshared/OnlyFreeMemoryAllocatedDynamicallyShared.expected

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ problems
77
| test.c:26:8:26:8 | p | test.c:25:13:25:14 | & ... | test.c:26:8:26:8 | p | Free expression frees memory which was not dynamically allocated. |
88
edges
99
| test.c:18:24:18:26 | ptr | test.c:18:36:18:38 | ptr | provenance | |
10+
| test.c:25:13:25:14 | & ... | test.c:25:13:25:14 | & ... | provenance | |
1011
| test.c:25:13:25:14 | & ... | test.c:26:8:26:8 | p | provenance | |
11-
| test.c:27:7:27:8 | & ... | test.c:28:15:28:15 | p | provenance | |
12+
| test.c:27:3:27:8 | ... = ... | test.c:28:15:28:15 | p | provenance | |
13+
| test.c:27:7:27:8 | & ... | test.c:27:3:27:8 | ... = ... | provenance | |
1214
| test.c:28:15:28:15 | p | test.c:18:24:18:26 | ptr | provenance | |
1315
nodes
1416
| test.c:8:8:8:10 | g_p | semmle.label | g_p |
@@ -18,7 +20,9 @@ nodes
1820
| test.c:18:24:18:26 | ptr | semmle.label | ptr |
1921
| test.c:18:36:18:38 | ptr | semmle.label | ptr |
2022
| test.c:25:13:25:14 | & ... | semmle.label | & ... |
23+
| test.c:25:13:25:14 | & ... | semmle.label | & ... |
2124
| test.c:26:8:26:8 | p | semmle.label | p |
25+
| test.c:27:3:27:8 | ... = ... | semmle.label | ... = ... |
2226
| test.c:27:7:27:8 | & ... | semmle.label | & ... |
2327
| test.c:28:15:28:15 | p | semmle.label | p |
2428
subpaths

cpp/common/src/codingstandards/cpp/rules/onlyfreememoryallocateddynamicallyshared/OnlyFreeMemoryAllocatedDynamicallyShared.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import cpp
77
import codingstandards.cpp.Customizations
88
import codingstandards.cpp.Exclusions
99
import codingstandards.cpp.Allocations
10-
import semmle.code.cpp.dataflow.DataFlow
10+
import semmle.code.cpp.dataflow.new.DataFlow
1111
import NonDynamicPointerToFreeFlow::PathGraph
1212

1313
/**

0 commit comments

Comments
 (0)