diff --git a/VAX/vax4xx_va.c b/VAX/vax4xx_va.c index b6e58333..92de2e56 100644 --- a/VAX/vax4xx_va.c +++ b/VAX/vax4xx_va.c @@ -1297,6 +1297,7 @@ if (!vid_active) { va_lines = (uint32 *) calloc (VA_XSIZE * VA_YSIZE, sizeof (uint32)); if (va_lines == NULL) { free (va_buf); + va_buf = NULL; vid_close (); return SCPE_MEM; } diff --git a/VAX/vax4xx_vc.c b/VAX/vax4xx_vc.c index fa4f78f9..4f1d5fc5 100644 --- a/VAX/vax4xx_vc.c +++ b/VAX/vax4xx_vc.c @@ -509,6 +509,7 @@ if (!vid_active && !vc_active) { vc_lines = (uint32 *) calloc (VC_XSIZE * VC_YSIZE, sizeof (uint32)); if (vc_lines == NULL) { free (vc_buf); + vc_buf = NULL; vid_close (); return SCPE_MEM; } diff --git a/VAX/vax4xx_ve.c b/VAX/vax4xx_ve.c index 2a8952c5..61395833 100644 --- a/VAX/vax4xx_ve.c +++ b/VAX/vax4xx_ve.c @@ -1460,6 +1460,7 @@ if (!vid_active && !ve_active) { ve_lines = (uint32 *) calloc (VE_XSIZE*VE_YSIZE, sizeof (uint32)); if (ve_lines == NULL) { free (ve_buf); + ve_buf = NULL; vid_close (); return SCPE_MEM; } diff --git a/VAX/vax_va.c b/VAX/vax_va.c index 19b1d8af..64629fc8 100644 --- a/VAX/vax_va.c +++ b/VAX/vax_va.c @@ -1119,6 +1119,7 @@ if (!vid_active) { va_lines = (uint32 *) calloc (VA_XSIZE * VA_YSIZE, sizeof (uint32)); if (va_lines == NULL) { free (va_buf); + va_buf = NULL; vid_close (); return SCPE_MEM; } diff --git a/VAX/vax_vc.c b/VAX/vax_vc.c index 4c577879..ac603963 100644 --- a/VAX/vax_vc.c +++ b/VAX/vax_vc.c @@ -1035,6 +1035,7 @@ if (!vid_active) { vc_lines = (uint32 *) calloc (VC_XSIZE*VC_YSIZE, sizeof (uint32)); if (vc_lines == NULL) { free (vc_buf); + vc_buf = NULL; vid_close (); return SCPE_MEM; } @@ -1043,6 +1044,7 @@ if (!vid_active) { free (vc_lines); vc_lines = NULL; free (vc_buf); + vc_buf = NULL; vid_close (); return SCPE_MEM; }