vm: Fix sparepage resource leak.

Fix a sparepage resource leak by preventing to call
vm_getsparepage twice.

Change-Id: I06557d47b90a7cca74e0a86921c2579f9618685d
This commit is contained in:
Kees Jongenburger 2012-12-31 17:43:25 +00:00
parent f26ce0ba44
commit fce5ff6513

View file

@ -402,8 +402,6 @@ void *vm_allocpages(phys_bytes *phys, int reason, int pages)
if((level > 1) || !pt_init_done) {
void *s;
s=vm_getsparepage(phys);
if(pages == 1) s=vm_getsparepage(phys);
else if(pages == 4) s=vm_getsparepagedir(phys);
else panic("%d pages", pages);