SCP: Prevent use of uninitialized pointer.
This commit is contained in:
parent
4497bba48f
commit
3acbd0e2ca
1 changed files with 2 additions and 2 deletions
4
scp.c
4
scp.c
|
@ -2526,7 +2526,7 @@ char gbuf[CBUFSIZE], *cvptr;
|
|||
DEVICE *dptr;
|
||||
UNIT *uptr;
|
||||
MTAB *mptr;
|
||||
SHTAB *shtb, *shptr;
|
||||
SHTAB *shtb = NULL, *shptr;
|
||||
|
||||
static SHTAB show_glob_tab[] = {
|
||||
{ "CONFIGURATION", &show_config, 0 },
|
||||
|
@ -2636,7 +2636,7 @@ while (*cptr != 0) { /* do all mods */
|
|||
} /* end if */
|
||||
} /* end for */
|
||||
if (mptr->mask == 0) { /* no match? */
|
||||
if ((shptr = find_shtab (shtb, gbuf))) /* global match? */
|
||||
if (shtb && (shptr = find_shtab (shtb, gbuf))) /* global match? */
|
||||
shptr->action (ofile, dptr, uptr, shptr->arg, cptr);
|
||||
else return SCPE_ARG;
|
||||
} /* end if */
|
||||
|
|
Loading…
Add table
Reference in a new issue