email plugin: Fix freeing linked lists.
authorFlorian Forster <octo@collectd.org>
Wed, 17 Jun 2015 08:37:31 +0000 (10:37 +0200)
committerFlorian Forster <octo@collectd.org>
Wed, 17 Jun 2015 08:37:31 +0000 (10:37 +0200)
commit1205b167f300adacdcf7d5dd385299d2b05ace32
tree1b03f26eb2d2db31cf0364278e1a18a73189acb7
parent7f6c4a16fdacab6c11f8a7756f0d8438ce198288
email plugin: Fix freeing linked lists.

The previous code essentially did:

    for (…; …; ptr = ptr->next)
      free (ptr);

The "ptr->next" is a use-after-free.
src/email.c