mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix log at high verbosity and memory allocation failure.
git-svn-id: file:///svn/unbound/trunk@3278 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
58542119a2
commit
24236a6d28
2 changed files with 7 additions and 5 deletions
|
|
@ -1,3 +1,6 @@
|
|||
24 November 2014: Wouter
|
||||
- Fix log at high verbosity and memory allocation failure.
|
||||
|
||||
21 November 2014: Wouter
|
||||
- Fix crash on multiple thread random usage on systems without
|
||||
arc4random.
|
||||
|
|
|
|||
|
|
@ -773,15 +773,14 @@ log_dns_msg(const char* str, struct query_info* qinfo, struct reply_info* rep)
|
|||
region, 65535, 1)) {
|
||||
log_info("%s: log_dns_msg: out of memory", str);
|
||||
} else {
|
||||
char* str = sldns_wire2str_pkt(sldns_buffer_begin(buf),
|
||||
char* s = sldns_wire2str_pkt(sldns_buffer_begin(buf),
|
||||
sldns_buffer_limit(buf));
|
||||
if(!str) {
|
||||
if(!s) {
|
||||
log_info("%s: log_dns_msg: ldns tostr failed", str);
|
||||
} else {
|
||||
log_info("%s %s",
|
||||
str, (char*)sldns_buffer_begin(buf));
|
||||
log_info("%s %s", str, s);
|
||||
}
|
||||
free(str);
|
||||
free(s);
|
||||
}
|
||||
sldns_buffer_free(buf);
|
||||
regional_destroy(region);
|
||||
|
|
|
|||
Loading…
Reference in a new issue