From: Florian Forster Date: Tue, 23 Apr 2013 05:15:44 +0000 (+0200) Subject: write_riemann plugin: Really fix a memory leak. X-Git-Tag: collectd-5.3.1~6 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=7e711643c470b830f3f8e94512c0a7adf5418202;p=collectd.git write_riemann plugin: Really fix a memory leak. Github: #307 --- diff --git a/src/write_riemann.c b/src/write_riemann.c index b5242172..15bb2378 100644 --- a/src/write_riemann.c +++ b/src/write_riemann.c @@ -73,7 +73,11 @@ static void riemann_event_protobuf_free (Event *event) /* {{{ */ 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;