writer: clear values before setting counters

We have an annoying issue where we look at all fiends of a counter values
chunk in the counter set frame. So we need those values set to zero. If
we are passed fewer counter values than can fit in the frame, we leave
some of that data uninitialized. This ensures that it is cleared.
This commit is contained in:
Christian Hergert
2018-05-17 11:38:34 +01:00
parent 851e593ae5
commit b4d5fdd5e4

View File

@ -1120,6 +1120,8 @@ sp_capture_writer_set_counters (SpCaptureWriter *self,
if (!set)
return FALSE;
memset (set, 0, len);
sp_capture_writer_frame_init (&set->frame,
len,
cpu,