X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fipvs.c;h=cbb554286bd08f292219ff91b8a81a601925638d;hb=25b5f5c49dd50c64f41b7bf69b8e471b0ffc6f15;hp=ab76f1eb8638d2517dd1e56ddb981148d17ed556;hpb=26fbc23e518dcc74502ae3b2495112adc3840879;p=collectd.git diff --git a/src/ipvs.c b/src/ipvs.c index ab76f1eb..cbb55428 100644 --- a/src/ipvs.c +++ b/src/ipvs.c @@ -45,7 +45,9 @@ #endif /* HAVE_NETINET_IN_H */ /* this can probably only be found in the kernel sources */ -#if HAVE_NET_IP_VS_H +#if HAVE_LINUX_IP_VS_H +# include +#elif HAVE_NET_IP_VS_H # include #elif HAVE_IP_VS_H # include @@ -293,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);