Skip to content

Commit

Permalink
COMP: l_image already dereferenced many times, no need to check for…
Browse files Browse the repository at this point in the history
… null

cppcheck warned:

nullPointerRedundantCheck,itkJPEG2000ImageIO.cxx:348,warning,Either the condition 'l_image' is redundant or there is possible null pointer dereference: l_image.
  • Loading branch information
seanm authored and N-Dekker committed Jan 7, 2025
1 parent ab1ba0b commit 9207a7c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Modules/IO/JPEG2000/src/itkJPEG2000ImageIO.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,7 @@ JPEG2000ImageIO::ReadImageInformation()
this->m_Internal->m_Dinfo = nullptr;
}

if (l_image)
{
opj_image_destroy(l_image);
}
opj_image_destroy(l_image);
}

void
Expand Down

0 comments on commit 9207a7c

Please sign in to comment.