internal: fix clang-tidy "errors" (#11862)
This commit is contained in:
parent
43fb4753fc
commit
4d82cc5957
13 changed files with 133 additions and 26 deletions
|
|
@ -3016,11 +3016,11 @@ std::optional<std::string> CConfigManager::handleSource(const std::string& comma
|
|||
return "source= path " + rawpath + " bogus!";
|
||||
}
|
||||
|
||||
std::unique_ptr<glob_t, void (*)(glob_t*)> glob_buf{sc<glob_t*>(calloc(1, sizeof(glob_t))), // allocate and zero-initialize
|
||||
std::unique_ptr<glob_t, void (*)(glob_t*)> glob_buf{sc<glob_t*>(calloc(1, sizeof(glob_t))), // allocate and zero-initialize NOLINT(cppcoreguidelines-no-malloc)
|
||||
[](glob_t* g) {
|
||||
if (g) {
|
||||
globfree(g); // free internal resources allocated by glob()
|
||||
free(g); // free the memory for the glob_t structure
|
||||
free(g); // free the memory for the glob_t structure NOLINT(cppcoreguidelines-no-malloc)
|
||||
}
|
||||
}};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue