mirror of
https://git.rtems.org/rtems-tools/
synced 2025-07-27 21:17:43 +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,7 +140,7 @@ done:
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
notFoundFile = fopen( fileName, "w" );
|
notFoundFile = fopen( fileName, "w" );
|
||||||
if (!fileName) {
|
if (notFoundFile == nullptr) {
|
||||||
std::ostringstream what;
|
std::ostringstream what;
|
||||||
what << "Unable to open " << fileName
|
what << "Unable to open " << fileName
|
||||||
<< " out of sync at the explanation";
|
<< " out of sync at the explanation";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user