[bugfix] don't melt base header into *backword* free chunk as well.
This commit is contained in:
parent
ebcf6d00fb
commit
6fdd5ef05d
|
@ -203,7 +203,7 @@ heap_free(pic_state *pic, void *ap)
|
||||||
} else {
|
} else {
|
||||||
bp->s.ptr = p->s.ptr;
|
bp->s.ptr = p->s.ptr;
|
||||||
}
|
}
|
||||||
if (p + p->s.size == bp) {
|
if (p + p->s.size == bp && bp->s.size > 0) { /* don't melt base header */
|
||||||
p->s.size += bp->s.size;
|
p->s.size += bp->s.size;
|
||||||
p->s.ptr = bp->s.ptr;
|
p->s.ptr = bp->s.ptr;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue