do not assume PrivateData != NULL on closing
This commit is contained in:
@@ -418,6 +418,7 @@ IOWarrior_close(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
if (p != NULL) {
|
||||
/* don't turn display off: keep the logoff message */
|
||||
// iowlcd_display_on_off(p->udh,0,0,0);
|
||||
|
||||
@@ -438,8 +439,8 @@ PrivateData *p = drvthis->private_data;
|
||||
free(p->backingstore);
|
||||
p->backingstore = NULL;
|
||||
|
||||
if (p != NULL)
|
||||
free(p);
|
||||
}
|
||||
drvthis->store_private_ptr(drvthis, NULL);
|
||||
|
||||
debug(RPT_DEBUG, "IOWarrior: closed");
|
||||
|
||||
Reference in New Issue
Block a user