perl plugin: Fix invalid free().
authorFlorian Forster <octo@collectd.org>
Wed, 17 Jun 2015 05:26:39 +0000 (07:26 +0200)
committerFlorian Forster <octo@collectd.org>
Wed, 17 Jun 2015 05:26:42 +0000 (07:26 +0200)
notification_meta_t.name is a char[], which we must not free.

src/perl.c

index 78e508a..5aa96c3 100644 (file)
@@ -510,7 +510,6 @@ static int av2notification_meta (pTHX_ AV *array, notification_meta_t **meta)
                if (NULL == (tmp = hv_fetch (hash, "value", 5, 0))) {
                        log_warn ("av2notification_meta: Skipping invalid "
                                        "meta information.");
-                       free ((*m)->name);
                        free (*m);
                        continue;
                }