kernel/debug: Zero-initialize droppedEvents.

There is a case where NextBuffer can return B_OK without initializing
droppedEvents, so make sure we do that here.
This commit is contained in:
Augustin Cavalier 2020-02-20 12:11:09 -05:00
parent 8e1e00129c
commit 46ab6b2917
1 changed files with 1 additions and 1 deletions

View File

@ -1626,7 +1626,7 @@ _user_system_profiler_next_buffer(size_t bytesRead, uint64* _droppedEvents)
BReference<SystemProfiler> reference(profiler);
locker.Unlock();
uint64 droppedEvents;
uint64 droppedEvents = 0;
status_t error = profiler->NextBuffer(bytesRead,
_droppedEvents != NULL ? &droppedEvents : NULL);
if (error == B_OK && _droppedEvents != NULL)