src/utils_format_json.c: Handle empty meta_data_t gracefully.
authorFlorian Forster <octo@collectd.org>
Tue, 2 Sep 2014 17:49:11 +0000 (19:49 +0200)
committerFlorian Forster <octo@collectd.org>
Tue, 2 Sep 2014 17:49:14 +0000 (19:49 +0200)
commit7acb8df1c0fa0065f267d7f5af2abe260340900e
tree5bcc007389456130914c28cf38caa734907a6393
parent0f4dc42a2a786763134d9661273608cfb2f52821
src/utils_format_json.c: Handle empty meta_data_t gracefully.

Previously, `meta != NULL` and `keys_num == 0` was possible and would
result in "{}", which is not valid JSON.

Fixes: 716
src/utils_format_json.c