Don't lose linked list tail
authorEsa Ilari Vuokko <ei@vuokko.info>
Thu, 31 Aug 2006 22:33:15 +0000 (22:33 +0000)
committerEsa Ilari Vuokko <ei@vuokko.info>
Thu, 31 Aug 2006 22:33:15 +0000 (22:33 +0000)
rts/MBlock.c

index edde679..c886fd5 100644 (file)
@@ -408,7 +408,7 @@ findFreeBlocks(nat n) {
         if( (((unsigned long)it->base) & MBLOCK_MASK) == 0) { /* MBlock aligned */
             ret = (void*)it->base;
             if(it->size==required_size) {
-                prev->next=0;
+                prev->next=it->next;
                 stgFree(it);
             } else {
                 it->base += required_size;