summaryrefslogtreecommitdiffstats
path: root/exporting/graphite
diff options
context:
space:
mode:
authorthiagoftsm <thiagoftsm@gmail.com>2020-05-26 12:50:04 +0000
committerGitHub <noreply@github.com>2020-05-26 12:50:04 +0000
commit605705a164e2ef562b7b309cf5607918978bc039 (patch)
tree87293864686799504e70412f88da49f2f7545754 /exporting/graphite
parentba47e197056601c7db3ce8db0db277d155e8118a (diff)
Missing checks exporting (#9034)
Add tests to uv_mutex_init and uv_cond_init inside exporting.
Diffstat (limited to 'exporting/graphite')
-rw-r--r--exporting/graphite/graphite.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/exporting/graphite/graphite.c b/exporting/graphite/graphite.c
index 8404722569..f41d1a7b1b 100644
--- a/exporting/graphite/graphite.c
+++ b/exporting/graphite/graphite.c
@@ -37,8 +37,10 @@ int init_graphite_instance(struct instance *instance)
error("EXPORTING: cannot create buffer for graphite exporting connector instance %s", instance->config.name);
return 1;
}
- uv_mutex_init(&instance->mutex);
- uv_cond_init(&instance->cond_var);
+ if (uv_mutex_init(&instance->mutex))
+ return 1;
+ if (uv_cond_init(&instance->cond_var))
+ return 1;
return 0;
}