aboutsummaryrefslogtreecommitdiff
path: root/src/tun/regex.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-11-28 19:27:05 +0000
committerChristian Grothoff <christian@grothoff.org>2013-11-28 19:27:05 +0000
commit2bd36bff24ee64101788f997cc55aad352e80bfa (patch)
treed27f69bceb948ddded961e27e786de1de8dbbcf3 /src/tun/regex.c
parent6906a00144752785313ec3fd1af4a2552b739af5 (diff)
-fix leak
Diffstat (limited to 'src/tun/regex.c')
-rw-r--r--src/tun/regex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tun/regex.c b/src/tun/regex.c
index 5baad60ee2..a40b0545af 100644
--- a/src/tun/regex.c
+++ b/src/tun/regex.c
@@ -382,6 +382,7 @@ GNUNET_TUN_ipv4policy2regex (const char *policy)
if (NULL == line)
{
GNUNET_free_non_null (reg);
+ GNUNET_free (np);
return NULL;
}
if (NULL == reg)
@@ -400,6 +401,7 @@ GNUNET_TUN_ipv4policy2regex (const char *policy)
if (0 == np[i].network.s_addr)
break;
}
+ GNUNET_free (np);
return reg;
}
@@ -434,6 +436,7 @@ GNUNET_TUN_ipv6policy2regex (const char *policy)
if (NULL == line)
{
GNUNET_free_non_null (reg);
+ GNUNET_free (np);
return NULL;
}
if (NULL == reg)
@@ -452,6 +455,7 @@ GNUNET_TUN_ipv6policy2regex (const char *policy)
if (0 == memcmp (&zero, &np[i].network, sizeof (struct in6_addr)))
break;
}
+ GNUNET_free (np);
return reg;
}