mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01:00
10 lines
256 B
C++
10 lines
256 B
C++
FILE* f() {
|
|
try {
|
|
FILE *fp = fopen("foo.txt", "w");
|
|
do_stuff(fp);
|
|
return fp; //if there are no exceptions, the file pointer is returned correctly
|
|
} catch (int do_stuff_exception) {
|
|
return NULL; //returns NULL on error, but does not close fp
|
|
}
|
|
}
|