]> Zhao Yanbai Git Server - minix.git/commitdiff
vm: Fix sparepage resource leak. 54/154/2
authorKees Jongenburger <keesj@minix3.org>
Mon, 31 Dec 2012 17:43:25 +0000 (17:43 +0000)
committerKees Jongenburger <keesj@minix3.org>
Mon, 7 Jan 2013 08:12:09 +0000 (09:12 +0100)
Fix a sparepage resource leak by preventing to call
vm_getsparepage twice.

Change-Id: I06557d47b90a7cca74e0a86921c2579f9618685d

servers/vm/arch/i386/pagetable.c

index 19051299b9e5ad814703d730ebf19828dc382fe3..5a3f2dd07f8f9f4ff24a1a6240d6fe29668a5dec 100644 (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);