CodeQL library for C/C++
Search

Predicate allocMayBeFreed

An allocation expression that might be deallocated. For example:

int* p = new int;
...
delete p;

Import path

import Critical.MemoryFreed
predicate allocMayBeFreed(AllocationExpr alloc)