mirror of
https://github.com/github/codeql.git
synced 2026-01-15 07:24:49 +01:00
8 lines
181 B
C++
8 lines
181 B
C++
int* f() {
|
|
int *buff = malloc(SIZE*sizeof(int));
|
|
do_stuff(buff);
|
|
free(buff); // GOOD: buff is only freed once.
|
|
int *new_buffer = malloc(SIZE*sizeof(int));
|
|
return new_buffer;
|
|
}
|