[novm] fix the bug which cause memory leak in novm

This commit is contained in:
leliang.zhang
2018-06-08 11:42:52 +08:00
committed by Travis Geiselbrecht
parent fa56abf5f9
commit dfc1159abb

View File

@@ -247,7 +247,9 @@ status_t novm_alloc_specific_pages(void *address, size_t pages)
err = ERR_NO_MEMORY;
break;
}
map[index + i] = 1;
}
if (err == NO_ERROR) {
memset(map + index, 1, pages);
}
mutex_release(&n->lock);