We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40dde93 commit 31b71eaCopy full SHA for 31b71ea
cpp/ql/test/query-tests/Critical/MemoryFreed/test_free.cpp
@@ -39,9 +39,9 @@ void test_dominance2(void *a) {
39
40
void test_post_dominance1(int *a)
41
{
42
- if (condition()) free(a); // GOOD
43
- if (condition()) a[2] = 5; // GOOD
44
+ if (condition()) free(a);
+ if (condition()) a[2] = 5; // BAD [NOT DETECTED]
+ if (condition()) free(a); // BAD [NOT DETECTED]
45
a[2] = 5; // BAD
46
free(a); // BAD
47
}
0 commit comments