summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Toorop <willem@nlnetlabs.nl>2019-02-25 12:31:05 +0100
committerWillem Toorop <willem@nlnetlabs.nl>2019-02-25 12:31:05 +0100
commit411c97d549bc9bf9b87fce33cd697d920b0d5acc (patch)
tree0451033999eadc6769d8a4d8e8c15c676e43ec91
parent7f6a56ad84fbc05859d35b5bcd45df3e32e6db0f (diff)
downloadldns-411c97d549bc9bf9b87fce33cd697d920b0d5acc.tar.gz
Don't write to return by reference on error
-rw-r--r--resolver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/resolver.c b/resolver.c
index a9860ebe..5a1db901 100644
--- a/resolver.c
+++ b/resolver.c
@@ -1252,7 +1252,7 @@ ldns_resolver_send_pkt(ldns_pkt **answer, ldns_resolver *r,
}
}
- if (answer) {
+ if (answer && answer_pkt) {
*answer = answer_pkt;
}