Memory leak in error path.

This commit is contained in:
Tomas Hozza authored and Simon Kelley committed 2014-03-25 20:43:21 +00:00
1 parent 490f90758d
commit fc2833f172
1 file changed
+5 -2
+5 -2
View 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);