projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7806744
)
utils_cache.c: plug leak on error
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 5 Dec 2015 12:39:03 +0000
(13:39 +0100)
committer
Florian Forster
<octo@collectd.org>
Sat, 5 Dec 2015 20:32:44 +0000
(21:32 +0100)
CID #38000
Signed-off-by: Florian Forster <octo@collectd.org>
src/utils_cache.c
patch
|
blob
|
history
diff --git
a/src/utils_cache.c
b/src/utils_cache.c
index
910e30b
..
5598f68
100644
(file)
--- a/
src/utils_cache.c
+++ b/
src/utils_cache.c
@@
-186,12
+186,13
@@
static int uc_insert (const data_set_t *ds, const value_list_t *vl,
/ CDTIME_T_TO_DOUBLE (vl->interval);
ce->values_raw[i].absolute = vl->values[i].absolute;
break;
-
+
default:
/* This shouldn't happen. */
ERROR ("uc_insert: Don't know how to handle data source type %i.",
ds->ds[i].type);
sfree (key_copy);
+ cache_free (ce);
return (-1);
} /* switch (ds->ds[i].type) */
} /* for (i) */