Skip to content

Commit a0072ba

Browse files
committed
fix base address if commit fails on aligned overallocation
1 parent 60f7e6a commit a0072ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/os.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ static void* mi_os_prim_alloc_aligned(size_t size, size_t alignment, bool commit
301301
// explicitly commit only the aligned part
302302
if (commit) {
303303
if (!_mi_os_commit(p, size, NULL)) {
304-
mi_os_prim_free(p, over_size, 0);
304+
mi_os_prim_free(*base, over_size, 0);
305305
return NULL;
306306
}
307307
}

0 commit comments

Comments
 (0)