| 240 | } |
| 241 | |
| 242 | bool CheckMemoryLeakImpl::isReopenStandardStream(const Token *tok) const |
| 243 | { |
| 244 | if (getReallocationType(tok, 0) == File) { |
| 245 | const Library::AllocFunc *f = mSettings.library.getReallocFuncInfo(tok); |
| 246 | if (f && f->reallocArg > 0 && f->reallocArg <= numberOfArguments(tok)) { |
| 247 | const Token* arg = getArguments(tok).at(f->reallocArg - 1); |
| 248 | if (Token::Match(arg, "stdin|stdout|stderr")) |
| 249 | return true; |
| 250 | } |
| 251 | } |
| 252 | return false; |
| 253 | } |
| 254 | |
| 255 | bool CheckMemoryLeakImpl::isOpenDevNull(const Token *tok) const |
| 256 | { |
nothing calls this directly
no test coverage detected