mirror of
https://github.com/nginx/nginx.git
synced 2024-11-26 02:40:46 -06:00
Made sure to initialize the entire "struct flock" allocated on stack.
This commit is contained in:
parent
3484e6d21c
commit
2219c566d7
@ -413,9 +413,7 @@ ngx_trylock_fd(ngx_fd_t fd)
|
||||
{
|
||||
struct flock fl;
|
||||
|
||||
fl.l_start = 0;
|
||||
fl.l_len = 0;
|
||||
fl.l_pid = 0;
|
||||
ngx_memzero(&fl, sizeof(struct flock));
|
||||
fl.l_type = F_WRLCK;
|
||||
fl.l_whence = SEEK_SET;
|
||||
|
||||
@ -432,9 +430,7 @@ ngx_lock_fd(ngx_fd_t fd)
|
||||
{
|
||||
struct flock fl;
|
||||
|
||||
fl.l_start = 0;
|
||||
fl.l_len = 0;
|
||||
fl.l_pid = 0;
|
||||
ngx_memzero(&fl, sizeof(struct flock));
|
||||
fl.l_type = F_WRLCK;
|
||||
fl.l_whence = SEEK_SET;
|
||||
|
||||
@ -451,9 +447,7 @@ ngx_unlock_fd(ngx_fd_t fd)
|
||||
{
|
||||
struct flock fl;
|
||||
|
||||
fl.l_start = 0;
|
||||
fl.l_len = 0;
|
||||
fl.l_pid = 0;
|
||||
ngx_memzero(&fl, sizeof(struct flock));
|
||||
fl.l_type = F_UNLCK;
|
||||
fl.l_whence = SEEK_SET;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user