diff options
author | Vladimir Kobal <vlad@prokk.net> | 2020-01-17 18:04:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-17 18:04:38 +0200 |
commit | d423c30847a3cf75833b5c2a6e93799cfd8462b9 (patch) | |
tree | 18268d5eeb01711268435eb307221194c5a16ad6 /exporting | |
parent | dacd6b9b11ecf3f843121be743b81967d3533072 (diff) |
Fix a Coverity issue (#7780)
Diffstat (limited to 'exporting')
-rw-r--r-- | exporting/init_connectors.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/exporting/init_connectors.c b/exporting/init_connectors.c index ba3802780a..fd8b03c6ca 100644 --- a/exporting/init_connectors.c +++ b/exporting/init_connectors.c @@ -64,7 +64,11 @@ int init_connectors(struct engine *engine) } // dispatch the instance worker thread - uv_thread_create(&instance->thread, connector->worker, instance); + int error = uv_thread_create(&instance->thread, connector->worker, instance); + if (error) { + error("EXPORTING: cannot create tread worker. uv_thread_create(): %s", uv_strerror(error)); + return 1; + } char threadname[NETDATA_THREAD_NAME_MAX+1]; snprintfz(threadname, NETDATA_THREAD_NAME_MAX, "EXPORTING-%zu", instance->index); uv_thread_set_name_np(instance->thread, threadname); |