summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 24c72b4)
raw | patch | inline | side by side (parent: 24c72b4)
author | Pavel Rochnyack <pavel2000@ngs.ru> | |
Mon, 16 Oct 2017 12:05:20 +0000 (19:05 +0700) | ||
committer | Pavel Rochnyack <pavel2000@ngs.ru> | |
Mon, 16 Oct 2017 12:05:20 +0000 (19:05 +0700) |
src/write_http.c | patch | blob | history |
diff --git a/src/write_http.c b/src/write_http.c
index c391e6937579f52c067cd98fcc9c15e59232abfb..16a21e65a991825d98873c7d4ae4ff4307e77349 100644 (file)
--- a/src/write_http.c
+++ b/src/write_http.c
cb->data_ttl = 0;
cb->metrics_prefix = strdup(WRITE_HTTP_DEFAULT_PREFIX);
+ if (cb->metrics_prefix == NULL) {
+ ERROR("write_http plugin: strdup failed.");
+ sfree(cb);
+ return -1;
+ }
+
pthread_mutex_init(&cb->send_lock, /* attr = */ NULL);
cf_util_get_string(ci, &cb->name);