mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[qfcc] Actually shrink the unaligned hole
This fixes the duplicate allocation caused by an exact fit aligned alloc in an unaligned hole where the padding remains free.
This commit is contained in:
parent
7518ba0a27
commit
be4021f8f4
1 changed files with 2 additions and 1 deletions
|
@ -173,7 +173,8 @@ defspace_alloc_aligned_loc (defspace_t *space, int size, int alignment)
|
|||
// exact fit, so just shrink the block or remove it if there is no
|
||||
// padding (any padding remains free)
|
||||
if (size + pad == loc->size) {
|
||||
if (!pad) {
|
||||
loc->size -= size;
|
||||
if (!loc->size) {
|
||||
*l = loc->next;
|
||||
del_locref (loc);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue