mirror of
https://github.com/ceph/ceph
synced 2024-12-26 21:43:10 +00:00
AsyncMessenger: reset newly allocated file_events
* otherwise there is chance that Event could take them as already initialized ones even they are filled with random bits from heap.
This commit is contained in:
parent
e4e1777894
commit
25cf82e2c8
@ -120,6 +120,7 @@ int EventCenter::create_file_event(int fd, int mask, EventCallbackRef ctxt)
|
||||
lderr(cct) << __func__ << " failed to realloc file_events" << cpp_strerror(errno) << dendl;
|
||||
return -errno;
|
||||
}
|
||||
memset(file_events+sizeof(FileEvent)*nevent, 0, sizeof(FileEvent)*(new_size-nevent));
|
||||
file_events = new_events;
|
||||
nevent = new_size;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user