]> git.ipfire.org Git - people/ms/dnsmasq.git/commitdiff
Memory leak in error path.
authorTomas Hozza <thozza@redhat.com>
Tue, 25 Mar 2014 20:43:21 +0000 (20:43 +0000)
committerSimon Kelley <simon@thekelleys.org.uk>
Tue, 25 Mar 2014 20:43:21 +0000 (20:43 +0000)
src/forward.c

index a60795945bf0abcb49da16164507612d77785a9d..71addb195faec13e841f58b5ef6b30993541d87d 100644 (file)
@@ -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);