summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a359afe)
raw | patch | inline | side by side (parent: a359afe)
author | Florian Forster <octo@collectd.org> | |
Tue, 8 Dec 2015 10:30:38 +0000 (11:30 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Tue, 8 Dec 2015 10:34:00 +0000 (11:34 +0100) |
CID: 37946
src/utils_format_json.c | patch | blob | history |
index 23a0fdf01d4de95f7cbad5a2955112ea7668ee72..020d80beacb5f8401d26ec891a202cd2da226db1 100644 (file)
--- a/src/utils_format_json.c
+++ b/src/utils_format_json.c
if (meta_data_get_string (meta, key, &value) == 0)
{
char temp[512] = "";
- json_escape_string (temp, sizeof (temp), value);
+
+ status = json_escape_string (temp, sizeof (temp), value);
sfree (value);
+ if (status != 0)
+ return status;
+
BUFFER_ADD (",\"%s\":%s", key, temp);
}
}