mirror of
https://github.com/simh/simh.git
synced 2026-02-27 01:00:07 +00:00
TAPE: Fix Coverity potential NULL pointer dereference
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user