X-Git-Url: https://git.tokkee.org/?p=collectd.git;a=blobdiff_plain;f=src%2Fwrite_riemann.c;h=3345d0444a94653a4e3be42a9d9051bfd264e790;hp=3e2ddd75b0d5caec3bbc40b5121b1de20ab819b4;hb=38d06a8f868293466f4eee943555c65457a5e560;hpb=a02ced789b4c93f293dc9d14a5a303c5fe11bcce diff --git a/src/write_riemann.c b/src/write_riemann.c index 3e2ddd75..3345d044 100644 --- a/src/write_riemann.c +++ b/src/write_riemann.c @@ -60,6 +60,8 @@ static size_t riemann_tags_num; static void riemann_event_protobuf_free (Event *event) /* {{{ */ { + size_t i; + if (event == NULL) return; @@ -72,6 +74,15 @@ static void riemann_event_protobuf_free (Event *event) /* {{{ */ event->tags = NULL; event->n_tags = 0; + for (i = 0; i < event->n_attributes; i++) + { + sfree (event->attributes[i]->key); + sfree (event->attributes[i]->value); + sfree (event->attributes[i]); + } + sfree (event->attributes); + event->n_attributes = 0; + sfree (event); } /* }}} void riemann_event_protobuf_free */