mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
nullify the memory chunk to avoid crashes when freeing resource
This commit is contained in:
parent
0e843a4582
commit
faa50318a3
1 changed files with 1 additions and 0 deletions
|
@ -437,6 +437,7 @@ static shm_pair *shm_get(int key, void *addr)
|
|||
TWG(shm) = newptr;
|
||||
ptr = newptr + TWG(shm_size);
|
||||
TWG(shm_size)++;
|
||||
memset(ptr, 0, sizeof(*ptr));
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue