Code

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 78e508ae4d1f1bb7c0b9ae5c9ca340b9685e79e6..5aa96c355b2494ace34fc361c42197f0df3cb0a6 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;
                }