Code

ipvs plugin: Fix memory leak.
authorFlorian Forster <octo@collectd.org>
Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)
committerFlorian Forster <octo@collectd.org>
Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)
src/ipvs.c

index fa894897bae658b532e9af4f692d3bd802e6f4b6..cbb554286bd08f292219ff91b8a81a601925638d 100644 (file)
@@ -295,7 +295,10 @@ static void cipvs_submit_service (struct ip_vs_service_entry *se)
        int i = 0;
 
        if (0 != get_pi (se, pi, sizeof (pi)))
+       {
+               free (dests);
                return;
+       }
 
        cipvs_submit_connections (pi, NULL, stats.conns);
        cipvs_submit_if (pi, "if_packets", NULL, stats.inpkts, stats.outpkts);