summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2011-06-23 18:26:45 +0000
committerBart De Schuymer <bdschuym@pandora.be>2011-06-23 18:26:45 +0000
commit691254bee26aa21632772add1dcf5cc02bcd6b05 (patch)
tree5b17d2fede9611cd082f52c0a69c9a4e9590e989
parent1293eca01ee8433f59df1015093b4d259aaecbf3 (diff)
downloadebtables-691254bee26aa21632772add1dcf5cc02bcd6b05.tar.gz
ebtables-691254bee26aa21632772add1dcf5cc02bcd6b05.tar.bz2
ebtables-691254bee26aa21632772add1dcf5cc02bcd6b05.zip
free possible memory leak found by Coverity static analysis (Jiri Popelka)
-rw-r--r--extensions/ebt_among.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/extensions/ebt_among.c b/extensions/ebt_among.c
index f90438e..b98f65b 100644
--- a/extensions/ebt_among.c
+++ b/extensions/ebt_among.c
@@ -202,11 +202,13 @@ static struct ebt_mac_wormhash *create_wormhash(const char *arg)
if (read_until(&pc, ":", token, 2) < 0
|| token[0] == 0) {
ebt_print_error("MAC parse error: %.20s", anchor);
+ free(workcopy);
return NULL;
}
mac[i] = strtol(token, &endptr, 16);
if (*endptr) {
ebt_print_error("MAC parse error: %.20s", anchor);
+ free(workcopy);
return NULL;
}
pc++;