X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fiptables.c;h=806b7a457f76308c3226aa3255444e97eeda20d5;hb=6ca14739ed8cc76de14bd9ac4d549ba2c7c72a93;hp=49454f050d755283b5cec6094a003116983e21fb;hpb=82e27678f8972d2625b466e7e7ba9daaa6395c98;p=collectd.git diff --git a/src/iptables.c b/src/iptables.c index 49454f05..806b7a45 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -29,8 +29,6 @@ #include "plugin.h" #include "configfile.h" -#include - #include #include @@ -213,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); } @@ -223,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));