0025-Fix-crash-freeing-negative-SRV-cache-entries.patch 748 B

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