OpenSCAP / scap-workbench

SCAP Scanner And Tailoring Graphical User Interface
https://www.open-scap.org/tools/scap-workbench
GNU General Public License v3.0
223 stars 65 forks source link

Fix potential NULL pointer dereference #276

Closed cipherboy closed 3 years ago

cipherboy commented 3 years ago

With the async behavior of Scanner (and its interactions in MainWindow), it isn't obvious that Session can't be non-NULL here. Hence it is probably better to move the session use into the if-guard.

Resolves: #262

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>


Looks like @mpreisler originally wrote the if-guard but didn't mention why it was necessary either :-)

evgenyz commented 3 years ago

LGTM