diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-05-18 10:53:16 +0200 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2018-07-10 23:41:14 +0200 |
commit | 0606971cb408c9635f17db8862dd5aa92551735c (patch) | |
tree | c14c9ab8d2906dba881e38718ed7da856054c989 /src/plugins/influxdb-writer.c | |
parent | 562f52010501fb2dda841fe44057ce7a3ffbd5da (diff) |
Fix: missing NULL array terminator
Make to sure to allocate enough space to store a NULL
pointer at the termination of the pointer array. Then
it could be browsed correctly
Change-Id: I6d13ba63715e688cd8fdc634ceabb9d3ec84eb87
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/plugins/influxdb-writer.c')
-rw-r--r-- | src/plugins/influxdb-writer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/influxdb-writer.c b/src/plugins/influxdb-writer.c index 677bfd0..3cf37d7 100644 --- a/src/plugins/influxdb-writer.c +++ b/src/plugins/influxdb-writer.c @@ -108,7 +108,7 @@ CURL *make_curl_write_post(AFB_ApiT apiHandle, const char *url, json_object *met } serie = malloc(sizeof(struct series_t)); - post_data = calloc(lpd, sizeof(void*)); + post_data = calloc(lpd + 1, sizeof(void*)); for(i = 0; i < lpd; i++) { memset(serie, 0, sizeof(struct series_t)); |