mirror of
https://git.rtems.org/rtems-tools/
synced 2025-07-26 05:20:28 +08:00
covoar: Fix NULL check of wrong variable (CID #1399602)
CID 1399602: Dereference null return value in Explanations::writeNotFound(). In Explanations::writeNotFound() there were two NULL checks of the `fileName` variable where only one is needed. The second check has been changed to a NULL check of `notFoundFile` to match the original intent. Closes #4377
This commit is contained in:
parent
de185fe1a9
commit
e84b9f3a94
@ -140,10 +140,10 @@ done:
|
||||
return;
|
||||
|
||||
notFoundFile = fopen( fileName, "w" );
|
||||
if (!fileName) {
|
||||
if (notFoundFile == nullptr) {
|
||||
std::ostringstream what;
|
||||
what << "Unable to open " << fileName
|
||||
<< "out of sync at the explanation";
|
||||
<< " out of sync at the explanation";
|
||||
throw rld::error( what, "Explanations::writeNotFound" );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user