зеркало из https://github.com/github/codeql.git
CPP: Move test into correct file.
This commit is contained in:
Родитель
d0849311a6
Коммит
2860c0c0d4
|
@ -26,7 +26,6 @@
|
|||
| test.cpp:128:15:128:16 | v4 |
|
||||
| test.cpp:185:10:185:12 | cpy |
|
||||
| test.cpp:199:10:199:12 | cpy |
|
||||
| test.cpp:205:7:205:11 | ... = ... |
|
||||
| test_free.cpp:11:10:11:10 | a |
|
||||
| test_free.cpp:14:10:14:10 | a |
|
||||
| test_free.cpp:16:10:16:10 | a |
|
||||
|
@ -97,6 +96,7 @@
|
|||
| test_free.cpp:255:10:255:10 | p |
|
||||
| test_free.cpp:260:9:260:9 | p |
|
||||
| test_free.cpp:263:12:263:12 | p |
|
||||
| test_free.cpp:269:7:269:11 | ... = ... |
|
||||
| virtual.cpp:18:10:18:10 | a |
|
||||
| virtual.cpp:19:10:19:10 | c |
|
||||
| virtual.cpp:38:10:38:10 | b |
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
| test.cpp:203:12:203:17 | call to malloc | This memory allocation may not be released at $@. | test.cpp:206:1:206:1 | return ... | this exit point |
|
||||
| test_free.cpp:36:22:36:35 | ... = ... | This memory allocation may not be released at $@. | test_free.cpp:38:1:38:1 | return ... | this exit point |
|
||||
| test_free.cpp:267:12:267:17 | call to malloc | This memory allocation may not be released at $@. | test_free.cpp:270:1:270:1 | return ... | this exit point |
|
||||
|
|
|
@ -198,9 +198,3 @@ void test_strndupa_dealloc() {
|
|||
char *cpy = strndupa(msg, 4);
|
||||
free(cpy); // BAD [NOT DETECTED]
|
||||
}
|
||||
|
||||
void test_free_malloc() {
|
||||
void *a = malloc(10);
|
||||
void *b;
|
||||
free(b = a);
|
||||
}
|
|
@ -261,4 +261,10 @@ void test_ref_delete(int *&p) {
|
|||
p = new int;
|
||||
use(p); // GOOD
|
||||
delete p; // GOOD
|
||||
}
|
||||
|
||||
void test_free_assign() {
|
||||
void *a = malloc(10);
|
||||
void *b;
|
||||
free(b = a); // GOOD
|
||||
}
|
Загрузка…
Ссылка в новой задаче