From 903a58aa61577c6cab6614bd9b25a8d005cee3f7 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 19 Jun 2015 10:54:02 +0200 Subject: [PATCH] rrdtool plugin: Add assertion. This helps the static code analysis to figure out that memory is not leaking after all. --- src/rrdtool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rrdtool.c b/src/rrdtool.c index bebf468c..8497a24c 100644 --- 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); -- 2.30.2