summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Hozza <thozza@redhat.com>2014-03-25 20:43:21 +0000
committerSimon Kelley <simon@thekelleys.org.uk>2014-03-25 20:43:21 +0000
commitfc2833f172819a9189bca20fe5777819a096baa4 (patch)
tree3087261b7c89e9d24a21bc7d82f3abe51d634a7c
parent490f90758dba741b10a2af6b70eb561777575e04 (diff)
downloaddnsmasq-fc2833f172819a9189bca20fe5777819a096baa4.tar.gz
Memory leak in error path.
-rw-r--r--src/forward.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/forward.c b/src/forward.c
index a607959..71addb1 100644
--- a/src/forward.c
+++ b/src/forward.c
@@ -1394,8 +1394,11 @@ static int tcp_check_for_unsigned_zone(time_t now, struct dns_header *header, s
struct crec *crecp = cache_find_by_name(NULL, name_start, now, F_DS);
if (--(*keycount) == 0)
- return STAT_BOGUS;
-
+ {
+ free(packet);
+ return STAT_BOGUS;
+ }
+
if (crecp && (crecp->flags & F_DNSSECOK))
{
free(packet);