Fix use-after-free bug

This commit is contained in:
Pim van Pelt
2017-11-26 18:06:17 +01:00
parent fb7e2a650d
commit c6f5fc3b8f

View File

@ -73,8 +73,8 @@ exit:
}
void screen_destroy(struct screen_t **s) {
free(*s);
if ((*s)->name) free ((*s)->name);
free(*s);
*s = NULL;
}