mirror of
https://github.com/github/codeql.git
synced 2026-01-15 15:34:49 +01:00
18 lines
185 B
C++
18 lines
185 B
C++
void g() {
|
|
MyTask *task = nullptr;
|
|
|
|
try
|
|
{
|
|
task = new MyTask;
|
|
|
|
...
|
|
|
|
delete task;
|
|
task = nullptr;
|
|
|
|
...
|
|
} catch (...) {
|
|
delete task; // GOOD: harmless if task is NULL
|
|
}
|
|
}
|