diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2020-05-26 12:50:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-26 12:50:04 +0000 |
commit | 605705a164e2ef562b7b309cf5607918978bc039 (patch) | |
tree | 87293864686799504e70412f88da49f2f7545754 /exporting/prometheus | |
parent | ba47e197056601c7db3ce8db0db277d155e8118a (diff) |
Missing checks exporting (#9034)
Add tests to uv_mutex_init and uv_cond_init inside exporting.
Diffstat (limited to 'exporting/prometheus')
-rw-r--r-- | exporting/prometheus/remote_write/remote_write.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/exporting/prometheus/remote_write/remote_write.c b/exporting/prometheus/remote_write/remote_write.c index 2a94fc44e7..4b6a7ba8ed 100644 --- a/exporting/prometheus/remote_write/remote_write.c +++ b/exporting/prometheus/remote_write/remote_write.c @@ -122,8 +122,10 @@ int init_prometheus_remote_write_instance(struct instance *instance) error("EXPORTING: cannot create buffer for AWS Kinesis 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; struct prometheus_remote_write_specific_data *connector_specific_data = callocz(1, sizeof(struct prometheus_remote_write_specific_data)); |