1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 19:56:25 +00:00

SCP, DISK: Fix Coverity identified debug path null pointer dereferences

This commit is contained in:
Mark Pizzolato
2018-04-17 23:51:39 -07:00
parent 309598e2cd
commit 15e86fb4ed
2 changed files with 3 additions and 2 deletions

View File

@@ -391,6 +391,7 @@ t_bool is_available;
if (!(uptr->flags & UNIT_ATT)) /* attached? */
return FALSE;
ctx = (struct disk_context *)uptr->disk_ctx;
switch (DK_GET_FMT (uptr)) { /* case on format */
case DKUF_F_STD: /* SIMH format */
is_available = TRUE;
@@ -399,8 +400,6 @@ switch (DK_GET_FMT (uptr)) { /* case on format */
is_available = TRUE;
break;
case DKUF_F_RAW: /* Raw Physical Disk Access */
ctx = (struct disk_context *)uptr->disk_ctx;
if (sim_os_disk_isavailable_raw (uptr->fileref)) {
if (ctx->media_removed) {
int32 saved_switches = sim_switches;