diff options
Diffstat (limited to 'package/network/services/dnsmasq/patches/0028-Tidy-cache_blockdata_free.patch')
-rw-r--r-- | package/network/services/dnsmasq/patches/0028-Tidy-cache_blockdata_free.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/package/network/services/dnsmasq/patches/0028-Tidy-cache_blockdata_free.patch b/package/network/services/dnsmasq/patches/0028-Tidy-cache_blockdata_free.patch new file mode 100644 index 0000000000..ed8170c59b --- /dev/null +++ b/package/network/services/dnsmasq/patches/0028-Tidy-cache_blockdata_free.patch @@ -0,0 +1,36 @@ +From 4bf62f616b82fad7a7f91195b0204dd64d79a35c Mon Sep 17 00:00:00 2001 +From: Simon Kelley <simon@thekelleys.org.uk> +Date: Thu, 10 Jan 2019 21:54:22 +0000 +Subject: [PATCH 28/30] Tidy cache_blockdata_free() + +Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> +--- + src/cache.c | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +--- a/src/cache.c ++++ b/src/cache.c +@@ -200,14 +200,17 @@ static void cache_hash(struct crec *crec + + static void cache_blockdata_free(struct crec *crecp) + { +- if (crecp->flags & F_SRV && !(crecp->flags & F_NEG)) +- blockdata_free(crecp->addr.srv.target); ++ if (!(crecp->flags & F_NEG)) ++ { ++ if (crecp->flags & F_SRV) ++ blockdata_free(crecp->addr.srv.target); + #ifdef HAVE_DNSSEC +- else if (crecp->flags & F_DNSKEY) +- blockdata_free(crecp->addr.key.keydata); +- else if ((crecp->flags & F_DS) && !(crecp->flags & F_NEG)) +- blockdata_free(crecp->addr.ds.keydata); ++ else if (crecp->flags & F_DNSKEY) ++ blockdata_free(crecp->addr.key.keydata); ++ else if (crecp->flags & F_DS) ++ blockdata_free(crecp->addr.ds.keydata); + #endif ++ } + } + + static void cache_free(struct crec *crecp) |