mirror of
https://github.com/open-simh/simh.git
synced 2026-01-13 23:37:13 +00:00
TAPE: Fix Coverity potential NULL pointer dereference
This commit is contained in:
parent
f0bee7f28e
commit
5135f137ea
@ -527,13 +527,14 @@ return SCPE_OK;
|
||||
t_stat sim_tape_detach (UNIT *uptr)
|
||||
{
|
||||
struct tape_context *ctx;
|
||||
uint32 f = MT_GET_FMT (uptr);
|
||||
uint32 f;
|
||||
t_stat r;
|
||||
t_bool auto_format = FALSE;
|
||||
|
||||
if (uptr == NULL)
|
||||
return SCPE_IERR;
|
||||
ctx = (struct tape_context *)uptr->tape_ctx;
|
||||
f = MT_GET_FMT (uptr);
|
||||
if ((ctx == NULL) || !(uptr->flags & UNIT_ATT))
|
||||
return SCPE_IERR;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user