summaryrefslogtreecommitdiffstats
path: root/userspace
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
commitfd54852e00243e6986a9d6224bb0ac746559e964 (patch)
tree82eb4648b0bde92464b97a70b42470544512354f /userspace
parentd80967c9d37e6a77cddc9926076fc7016a8c5034 (diff)
free possible memory leak found by Coverity static analysis (Jiri Popelka)
Diffstat (limited to 'userspace')
-rw-r--r--userspace/ebtables2/extensions/ebt_among.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/userspace/ebtables2/extensions/ebt_among.c b/userspace/ebtables2/extensions/ebt_among.c
index f90438e..b98f65b 100644
--- a/userspace/ebtables2/extensions/ebt_among.c
+++ b/userspace/ebtables2/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++;