projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7768626
)
Handle case when zone_find_stats() returns NULL
author
Dagobert Michelsen
<dam@opencsw.org>
Thu, 28 May 2015 11:09:49 +0000
(13:09 +0200)
committer
Dagobert Michelsen
<dam@opencsw.org>
Thu, 28 May 2015 11:09:49 +0000
(13:09 +0200)
src/zone.c
patch
|
blob
|
history
diff --git
a/src/zone.c
b/src/zone.c
index
325d556
..
c5eacef
100644
(file)
--- a/
src/zone.c
+++ b/
src/zone.c
@@
-162,8
+162,10
@@
zone_scandir(DIR *procdir)
sizeof(psinfo_t)) != 0)
continue;
stats = zone_find_stats(tree, psinfo.pr_zoneid);
- stats->pctcpu += psinfo.pr_pctcpu;
- stats->pctmem += psinfo.pr_pctmem;
+ if( stats ) {
+ stats->pctcpu += psinfo.pr_pctcpu;
+ stats->pctmem += psinfo.pr_pctmem;
+ }
}
return(tree);
}