1
0

0028-Tidy-cache_blockdata_free.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 4bf62f616b82fad7a7f91195b0204dd64d79a35c Mon Sep 17 00:00:00 2001
  2. From: Simon Kelley <simon@thekelleys.org.uk>
  3. Date: Thu, 10 Jan 2019 21:54:22 +0000
  4. Subject: [PATCH 28/32] Tidy cache_blockdata_free()
  5. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
  6. ---
  7. src/cache.c | 15 +++++++++------
  8. 1 file changed, 9 insertions(+), 6 deletions(-)
  9. --- a/src/cache.c
  10. +++ b/src/cache.c
  11. @@ -200,14 +200,17 @@ static void cache_hash(struct crec *crec
  12. static void cache_blockdata_free(struct crec *crecp)
  13. {
  14. - if (crecp->flags & F_SRV && !(crecp->flags & F_NEG))
  15. - blockdata_free(crecp->addr.srv.target);
  16. + if (!(crecp->flags & F_NEG))
  17. + {
  18. + if (crecp->flags & F_SRV)
  19. + blockdata_free(crecp->addr.srv.target);
  20. #ifdef HAVE_DNSSEC
  21. - else if (crecp->flags & F_DNSKEY)
  22. - blockdata_free(crecp->addr.key.keydata);
  23. - else if ((crecp->flags & F_DS) && !(crecp->flags & F_NEG))
  24. - blockdata_free(crecp->addr.ds.keydata);
  25. + else if (crecp->flags & F_DNSKEY)
  26. + blockdata_free(crecp->addr.key.keydata);
  27. + else if (crecp->flags & F_DS)
  28. + blockdata_free(crecp->addr.ds.keydata);
  29. #endif
  30. + }
  31. }
  32. static void cache_free(struct crec *crecp)