Fix memory leaks when plugin gets no results

Signed-off-by: Florian Forster <octo@collectd.org>