fix: do not leak when inserting the same page twice, just update
This commit is contained in:
@@ -292,7 +292,7 @@ fetch_page (void *upage, bool write)
|
||||
switch (page->type) {
|
||||
case PAGE_MMAP:
|
||||
case PAGE_FILE:
|
||||
success = page_load_file (page, page->writable);
|
||||
success = page_load_file (page);
|
||||
if (success && page->type == PAGE_FILE)
|
||||
{
|
||||
hash_delete (&thread_current ()->pages, &page->elem);
|
||||
|
||||
Reference in New Issue
Block a user