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:
@@ -1626,7 +1626,7 @@ _user_system_profiler_next_buffer(size_t bytesRead, uint64* _droppedEvents)
|
|||||||
BReference<SystemProfiler> reference(profiler);
|
BReference<SystemProfiler> reference(profiler);
|
||||||
locker.Unlock();
|
locker.Unlock();
|
||||||
|
|
||||||
uint64 droppedEvents;
|
uint64 droppedEvents = 0;
|
||||||
status_t error = profiler->NextBuffer(bytesRead,
|
status_t error = profiler->NextBuffer(bytesRead,
|
||||||
_droppedEvents != NULL ? &droppedEvents : NULL);
|
_droppedEvents != NULL ? &droppedEvents : NULL);
|
||||||
if (error == B_OK && _droppedEvents != NULL)
|
if (error == B_OK && _droppedEvents != NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user