summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e37293e)
raw | patch | inline | side by side (parent: e37293e)
author | Florian Forster <octo@collectd.org> | |
Fri, 16 Dec 2016 17:38:34 +0000 (18:38 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Fri, 16 Dec 2016 17:38:34 +0000 (18:38 +0100) |
CID: 157643
src/target_set.c | patch | blob | history |
diff --git a/src/target_set.c b/src/target_set.c
index 7d54c93b0f70405483c1ff950f57cd1de45110bf..a40273c0675c95d60c1b715e773feb0389848d59 100644 (file)
--- a/src/target_set.c
+++ b/src/target_set.c
REPLACE_FIELD("%{type_instance}", vl->type_instance);
if (vl->meta != NULL) {
- char **meta_toc;
+ char **meta_toc = NULL;
int meta_entries = meta_data_toc(vl->meta, &meta_toc);
+ if (meta_entries <= 0)
+ return;
+
for (int i = 0; i < meta_entries; i++) {
char meta_name[DATA_MAX_NAME_LEN];
char *value_str;