projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
python plugin: Check return value of malloc().
[collectd.git]
/
src
/
rrdtool.c
diff --git
a/src/rrdtool.c
b/src/rrdtool.c
index
192a04d
..
9b5723a
100644
(file)
--- a/
src/rrdtool.c
+++ b/
src/rrdtool.c
@@
-733,7
+733,10
@@
static int rrd_cache_insert (const char *filename,
{
rc = malloc (sizeof (*rc));
if (rc == NULL)
+ {
+ pthread_mutex_unlock (&cache_lock);
return (-1);
+ }
rc->values_num = 0;
rc->values = NULL;
rc->first_value = 0;