1
0
mirror of https://github.com/simh/simh.git synced 2026-04-24 19:33:40 +00:00

ibmpc, isys80xx, imds-225: Fix Coverity identified problems

This commit is contained in:
Bill Beech
2017-03-17 14:24:44 -07:00
parent b64f3cd1c7
commit 0f41c24cb8
8 changed files with 42 additions and 16 deletions

View File

@@ -1071,12 +1071,14 @@ t_stat isbc208_attach (UNIT *uptr, CONST char *cptr)
fseek(fp, 0, SEEK_SET);
if (flen == -1) {
sim_printf(" isbc208_attach: File error\n");
fclose(fp);
return SCPE_IOERR;
}
if (isbc208_buf[uptr->u6] == NULL) { /* no buffer allocated */
isbc208_buf[uptr->u6] = (uint8 *)malloc(flen);
if (isbc208_buf[uptr->u6] == NULL) {
sim_printf(" iSBC208_attach: Malloc error\n");
fclose(fp);
return SCPE_MEM;
}
}