diff options
author | Vladimir Kobal <vlad@prokk.net> | 2020-02-01 00:05:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-01 00:05:45 +0200 |
commit | 177af26ea878e673166ebbeb4518539f624a81f0 (patch) | |
tree | 9f874527a1e6e25c85a05d62b3623e6d8b5f79fd /web | |
parent | 43bc627b1dc2e667ad2e6e8a0c2ff1e0b512dcdf (diff) |
Parse host tags (#7702)
* Fix memory leaks
* Check for configuration options
* Parse simple tags
* Parse JSON tags
* Remove an unnecessary check
* Parse a JSON object
* Parse a JSON array
* Update the documentation
* Fix host locks
Diffstat (limited to 'web')
-rw-r--r-- | web/api/web_api_v1.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c index 4ac50524ad..ccb1339927 100644 --- a/web/api/web_api_v1.c +++ b/web/api/web_api_v1.c @@ -776,6 +776,7 @@ inline void host_labels2json(RRDHOST *host, BUFFER *wb, size_t indentation) { } int count = 0; + rrdhost_rdlock(host); netdata_rwlock_rdlock(&host->labels_rwlock); for (struct label *label = host->labels; label; label = label->next) { if(count > 0) buffer_strcat(wb, ",\n"); @@ -789,6 +790,7 @@ inline void host_labels2json(RRDHOST *host, BUFFER *wb, size_t indentation) { } buffer_strcat(wb, "\n"); netdata_rwlock_unlock(&host->labels_rwlock); + rrdhost_unlock(host); } inline int web_client_api_request_v1_info(RRDHOST *host, struct web_client *w, char *url) { |