aboutsummaryrefslogtreecommitdiff
path: root/src/tun
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
parent6906a00144752785313ec3fd1af4a2552b739af5 (diff)
downloadgnunet-2bd36bff24ee64101788f997cc55aad352e80bfa.tar.gz
gnunet-2bd36bff24ee64101788f997cc55aad352e80bfa.zip
-fix leak
Diffstat (limited to 'src/tun')
-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 5baad60ee..a40b0545a 100644
--- a/src/tun/regex.c
+++ b/src/tun/regex.c
@@ -382,6 +382,7 @@ GNUNET_TUN_ipv4policy2regex (const char *policy)
382 if (NULL == line) 382 if (NULL == line)
383 { 383 {
384 GNUNET_free_non_null (reg); 384 GNUNET_free_non_null (reg);
385 GNUNET_free (np);
385 return NULL; 386 return NULL;
386 } 387 }
387 if (NULL == reg) 388 if (NULL == reg)
@@ -400,6 +401,7 @@ GNUNET_TUN_ipv4policy2regex (const char *policy)
400 if (0 == np[i].network.s_addr) 401 if (0 == np[i].network.s_addr)
401 break; 402 break;
402 } 403 }
404 GNUNET_free (np);
403 return reg; 405 return reg;
404} 406}
405 407
@@ -434,6 +436,7 @@ GNUNET_TUN_ipv6policy2regex (const char *policy)
434 if (NULL == line) 436 if (NULL == line)
435 { 437 {
436 GNUNET_free_non_null (reg); 438 GNUNET_free_non_null (reg);
439 GNUNET_free (np);
437 return NULL; 440 return NULL;
438 } 441 }
439 if (NULL == reg) 442 if (NULL == reg)
@@ -452,6 +455,7 @@ GNUNET_TUN_ipv6policy2regex (const char *policy)
452 if (0 == memcmp (&zero, &np[i].network, sizeof (struct in6_addr))) 455 if (0 == memcmp (&zero, &np[i].network, sizeof (struct in6_addr)))
453 break; 456 break;
454 } 457 }
458 GNUNET_free (np);
455 return reg; 459 return reg;
456} 460}
457 461