To match the change in PDC_scr_open(), free SP in delscreen() rather

than PDC_scr_free().
This commit is contained in:
William McBrine
2019-09-11 10:02:57 -04:00
parent e3c606be1e
commit dcc68db1fd
8 changed files with 4 additions and 21 deletions

View File

@@ -246,8 +246,7 @@ the cursor to the lower left corner. (The X11 port does nothing.)
### void PDC_scr_free(void);
Frees the memory for SP allocated by PDC_scr_open(). Called by
delscreen().
Free any memory allocated by PDC_scr_open(). Called by delscreen().
### int PDC_scr_open(int argc, char **argv);

View File

@@ -479,8 +479,6 @@ void PDC_scr_close(void)
void PDC_scr_free(void)
{
if (SP)
free(SP);
}
/* open the physical screen -- miscellaneous initialization, may save

View File

@@ -79,8 +79,6 @@ void PDC_scr_close(void)
void PDC_scr_free(void)
{
if (SP)
free(SP);
}
/* open the physical screen -- miscellaneous initialization, may save

View File

@@ -294,7 +294,7 @@ void delscreen(SCREEN *sp)
{
PDC_LOG(("delscreen() - called\n"));
if (sp != SP)
if (!SP || sp != SP)
return;
PDC_slk_free(); /* free the soft label keys, if needed */
@@ -308,8 +308,9 @@ void delscreen(SCREEN *sp)
SP->alive = FALSE;
PDC_scr_free(); /* free SP */
PDC_scr_free();
free(SP);
SP = (SCREEN *)NULL;
}

View File

@@ -83,8 +83,6 @@ void PDC_scr_close(void)
void PDC_scr_free(void)
{
if (SP)
free(SP);
}
static void _initialize_colors(void)

View File

@@ -93,8 +93,6 @@ void PDC_scr_close(void)
void PDC_scr_free(void)
{
if (SP)
free(SP);
}
static void _initialize_colors(void)

View File

@@ -359,9 +359,6 @@ void PDC_scr_close(void)
void PDC_scr_free(void)
{
if (SP)
free(SP);
if (pdc_con_out != std_con_out)
{
CloseHandle(pdc_con_out);

View File

@@ -170,12 +170,6 @@ void PDC_scr_close(void)
void PDC_scr_free(void)
{
if (!SP)
return;
free(SP);
SP = NULL;
if (icon_pixmap)
XFreePixmap(XCURSESDISPLAY, icon_pixmap);
if (icon_pixmap_mask)