fix memspace creation fail bug.

This commit is contained in:
tuyuyang 2024-08-01 00:13:44 +08:00
parent 8ff99f7d4d
commit ece7cb6a7f
1 changed files with 1 additions and 0 deletions

View File

@ -168,6 +168,7 @@ uintptr_t* load_memspace(struct MemSpace* pmemspace, char* img_start)
error_exec:
if (pmemspace->pgdir.pd_addr != NULL) {
xizi_pager.free_user_pgdir(&pmemspace->pgdir);
pmemspace->pgdir.pd_addr = NULL;
}
ERROR("Error loading memspace.\n");
return NULL;