Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tidy: Ignore false positive memory leak warning.
Clang-tidy complains that the sub_read_file function leaks memory at the return statement at the end of the function, saying that the memory of the 'sub' variable is leaked. The pointer is always set as a result of a function call to parse something, and it typically set to point to the memory provided by the second argument. The only other possible values are nullptr or an error code. Since this pointer never owns any memory, there can't be a memory leak. https://clang.llvm.org/extra/clang-tidy/checks/clang-analyzer-unix.Malloc.html
- Loading branch information