Skip to content

Commit

Permalink
Don't write to return by reference on error
Browse files Browse the repository at this point in the history
  • Loading branch information
wtoorop committed Feb 25, 2019
1 parent 7f6a56a commit 411c97d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resolver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ ldns_resolver_send_pkt(ldns_pkt **answer, ldns_resolver *r,
}
}

if (answer) {
if (answer && answer_pkt) {
*answer = answer_pkt;
}

Expand Down

0 comments on commit 411c97d

Please sign in to comment.