X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fiptables.c;h=806b7a457f76308c3226aa3255444e97eeda20d5;hb=6ca14739ed8cc76de14bd9ac4d549ba2c7c72a93;hp=c39aff8fcd8d7d0ce3078bfad5d17ea0ccb2ed02;hpb=4ecefb9fb8183eadee48538553615c0425e51f69;p=collectd.git diff --git a/src/iptables.c b/src/iptables.c index c39aff8f..806b7a45 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -29,18 +29,8 @@ #include "plugin.h" #include "configfile.h" -#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 +44,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 +211,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 +222,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));