limine: Fix NULL term dereference bug if gterm_init fails

This commit is contained in:
mintsuki 2022-10-06 03:24:17 +02:00
parent a76691a930
commit aca99ad790
1 changed files with 4 additions and 2 deletions

View File

@ -754,8 +754,10 @@ term_fail:
goto skip_fb_init;
FEAT_END
term->deinit(term, pmm_free);
term = NULL;
if (term != NULL) {
term->deinit(term, pmm_free);
term = NULL;
}
if (!fb_init(&fb, req_width, req_height, req_bpp)) {
goto no_fb;