rrdtool plugin: Fix a possible race condition at startup.
authorFlorian Forster <octo@noris.net>
Fri, 6 Mar 2009 15:53:28 +0000 (16:53 +0100)
committerFlorian Forster <octo@noris.net>
Fri, 6 Mar 2009 15:53:28 +0000 (16:53 +0100)
commit4e57613ae19a71a0f180f0648223a139f48c932c
tree08be3d68063900ec65e461272be9b74b32e9c0dc
parent1cf13b782cb290af46afdc5fc7f8eae59b0b1188
rrdtool plugin: Fix a possible race condition at startup.

On a very busy system, if the network plugin was initialized before the
rrdtool plugin, `rrd_cache_insert' may be called before the RRDtool
plugin is initialized. It would then pass `cache == NULL' to
`c_avl_get', resulting in a segmentation fault.
src/rrdtool.c
src/utils_avltree.c