X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fiptables.c;h=606b24d9afdacfeda05ecd30a44f4976d674377a;hb=3e3848349b753d78a0b1d19648fb394866856bda;hp=c39aff8fcd8d7d0ce3078bfad5d17ea0ccb2ed02;hpb=aff80830f1154a5b6c4da16a0b1033aafde14e24;p=collectd.git diff --git a/src/iptables.c b/src/iptables.c index c39aff8f..606b24d9 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -31,16 +31,8 @@ #include -#if OWN_LIBIPTC -# include "owniptc/libiptc.h" -# include "owniptc/libip6tc.h" - -# define HAVE_IPTC_HANDLE_T 1 -# define HAVE_IP6TC_HANDLE_T 1 - -#else /* if !OWN_LIBIPTC */ -# include -# include +#include +#include /* * iptc_handle_t was available before libiptc was officially available as a @@ -54,13 +46,12 @@ * this is somewhat hacky, I didn't find better way to solve that :-/ * -tokkee */ -# ifndef HAVE_IPTC_HANDLE_T +#ifndef HAVE_IPTC_HANDLE_T typedef struct iptc_handle iptc_handle_t; -# endif -# ifndef HAVE_IP6TC_HANDLE_T +#endif +#ifndef HAVE_IP6TC_HANDLE_T typedef struct ip6tc_handle ip6tc_handle_t; -# endif -#endif /* !OWN_LIBIPTC */ +#endif /* * (Module-)Global variables @@ -222,6 +213,7 @@ static int iptables_config (const char *key, const char *value) char errbuf[1024]; ERROR ("realloc failed: %s", sstrerror (errno, errbuf, sizeof (errbuf))); + sfree (temp.rule.comment); return (1); } @@ -232,6 +224,7 @@ static int iptables_config (const char *key, const char *value) char errbuf[1024]; ERROR ("malloc failed: %s", sstrerror (errno, errbuf, sizeof (errbuf))); + sfree (temp.rule.comment); return (1); } memcpy (final, &temp, sizeof (temp));