sysvshm: fix shmrealloc
The code was supposed to initialize new segs in newsegs array, but used the old pointer.
This commit is contained in:
parent
cd336bad26
commit
0be3a191a4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=285055
@ -801,10 +801,10 @@ shmrealloc(void)
|
||||
for (i = 0; i < shmalloced; i++)
|
||||
bcopy(&shmsegs[i], &newsegs[i], sizeof(newsegs[0]));
|
||||
for (; i < shminfo.shmmni; i++) {
|
||||
shmsegs[i].u.shm_perm.mode = SHMSEG_FREE;
|
||||
shmsegs[i].u.shm_perm.seq = 0;
|
||||
newsegs[i].u.shm_perm.mode = SHMSEG_FREE;
|
||||
newsegs[i].u.shm_perm.seq = 0;
|
||||
#ifdef MAC
|
||||
mac_sysvshm_init(&shmsegs[i]);
|
||||
mac_sysvshm_init(&newsegs[i]);
|
||||
#endif
|
||||
}
|
||||
free(shmsegs, M_SHM);
|
||||
|
Loading…
Reference in New Issue
Block a user