Fix PCP ZramMeter in presense of missing zram metrics

This commit is contained in:
Sohaib 2021-02-22 16:50:39 +11:00 committed by Nathan Scott
parent e1d1a5cec6
commit 407d32e121
1 changed files with 3 additions and 0 deletions

View File

@ -605,6 +605,9 @@ void Platform_setZramValues(Meter* this) {
(void)this;
int i, count = Metric_instanceCount(PCP_ZRAM_CAPACITY);
if(!count)
return;
pmAtomValue *values = xCalloc(count, sizeof(pmAtomValue));
ZramStats stats = {0};