blob: 424574bbf6a121662b60e7ed87163b2c1fb9aee7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
From a90f09db4cc635941a32b973b57e58c662569625 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk>
Date: Wed, 9 Jan 2019 15:08:16 +0000
Subject: [PATCH 25/32] Fix crash freeing negative SRV cache entries.
Thanks to Daniel for finding this one.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
---
src/cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/src/cache.c
+++ b/src/cache.c
@@ -200,7 +200,7 @@ static void cache_hash(struct crec *crec
static void cache_blockdata_free(struct crec *crecp)
{
- if (crecp->flags & F_SRV)
+ if (crecp->flags & F_SRV && !(crecp->flags & F_NEG))
blockdata_free(crecp->addr.srv.target);
#ifdef HAVE_DNSSEC
else if (crecp->flags & F_DNSKEY)
|