bank8k: Make sure pagemap_free frees something
authorTormod Volden <debian.tormod@gmail.com>
Mon, 7 Jan 2019 21:28:52 +0000 (22:28 +0100)
committerAlan Cox <alan@linux.intel.com>
Tue, 8 Jan 2019 16:59:33 +0000 (16:59 +0000)
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Kernel/bank8k.c

index 31b35ee..b8791df 100644 (file)
@@ -115,7 +115,8 @@ void pagemap_free(ptptr p)
 {
        uint8_t *pt = (uint8_t *)p->p_page + LOBANK;
        uint8_t *e = (uint8_t *)p->p_page + PTNUM;
-       uint8_t last = *pt;
+       uint8_t last = PAGE_INVALID;
+
        while(pt < e) {
                if (*pt != PAGE_INVALID && *pt != PAGE_VIDEO && *pt != last) {
                        last = *pt;