mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
Add missing lock statement
This commit is contained in:
parent
527aaa41eb
commit
626a5d02ee
1 changed files with 2 additions and 0 deletions
|
@ -312,7 +312,9 @@ struct Map *__maps_alloc(void) {
|
|||
map->prot = PROT_READ | PROT_WRITE;
|
||||
map->flags = MAP_PRIVATE | MAP_ANONYMOUS | MAP_NOFORK;
|
||||
map->hand = sys.maphandle;
|
||||
__maps_lock();
|
||||
__maps_insert(map++);
|
||||
__maps_unlock();
|
||||
map->addr = MAP_FAILED;
|
||||
for (int i = 1; i < gransz / sizeof(struct Map) - 1; ++i)
|
||||
__maps_free(map + i);
|
||||
|
|
Loading…
Reference in a new issue