projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
utils_cache: Free then unused memory before returning in an error condition.
[collectd.git]
/
src
/
utils_cache.c
diff --git
a/src/utils_cache.c
b/src/utils_cache.c
index
6779bba
..
7938412
100644
(file)
--- a/
src/utils_cache.c
+++ b/
src/utils_cache.c
@@
-187,6
+187,7
@@
static int uc_insert (const data_set_t *ds, const value_list_t *vl,
ce = cache_alloc (ds->ds_num);
if (ce == NULL)
{
+ sfree (key_copy);
ERROR ("uc_insert: cache_alloc (%i) failed.", ds->ds_num);
return (-1);
}