mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
C++: Add some query tests.
This commit is contained in:
@@ -293,4 +293,11 @@ void test_free_struct4(char* buf, MyStruct s) {
|
||||
free(buf);
|
||||
s.buf = buf;
|
||||
char c = s.buf[0]; // BAD
|
||||
}
|
||||
|
||||
void g_free (void*);
|
||||
|
||||
void test_g_free(char* buf) {
|
||||
g_free(buf);
|
||||
g_free(buf); // BAD
|
||||
}
|
||||
Reference in New Issue
Block a user