projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78154d2
)
rrdtool plugin: Add assertion.
author
Florian Forster
<octo@collectd.org>
Fri, 19 Jun 2015 08:54:02 +0000
(10:54 +0200)
committer
Florian Forster
<octo@collectd.org>
Fri, 19 Jun 2015 08:57:46 +0000
(10:57 +0200)
This helps the static code analysis to figure out that memory is not
leaking after all.
src/rrdtool.c
patch
|
blob
|
history
diff --git
a/src/rrdtool.c
b/src/rrdtool.c
index
bebf468
..
8497a24
100644
(file)
--- a/
src/rrdtool.c
+++ b/
src/rrdtool.c
@@
-743,6
+743,7
@@
static int rrd_cache_insert (const char *filename,
new_rc = 1;
}
+ assert (value_time > 0); /* plugin_dispatch() ensures this. */
if (rc->last_value >= value_time)
{
pthread_mutex_unlock (&cache_lock);