aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2016-04-23 13:58:09 +0200
committerMartin Kaiser <wireshark@kaiser.cx>2016-04-23 12:03:05 +0000
commit9fbd4e6fcd28bbc2ea2223b19c0072f6a83192bb (patch)
tree400808698fdbd884ef172203dff3044bf8c08453
parent76ae74cea34c47e25e4e387ee3990ba7c1231e6e (diff)
addr_resolv: don't free the same wmem_list entry twice
fetch the list head each time we iterate through the list if we don't, we crash when the same entry is removed a second time #0 wmem_block_remove_from_block_list (block=0x7fffecd7b1c0, allocator=<optimized out>) at wmem_allocator_block.c:738 #1 wmem_block_free_jumbo (chunk=0x7fffecd7b1d0, allocator=0x65c060) at wmem_allocator_block.c:822 #2 wmem_block_free (private_data=0x65c060, ptr=0x7fffecd7b1e0) at wmem_allocator_block.c:913 #3 0x00007ffff452eac1 in host_name_lookup_process () at addr_resolv.c:2466 #4 0x000000000041733d in process_packet (cf=cf@entry=0x63fe20, edt=edt@entry=0xce08f0, offset=<optimized out>, whdr=0xc97c70, pd=pd@entry=0xc9f550 "", tap_flags=tap_flags@entry=0) at tshark.c:3699 #5 0x000000000040f199 in load_cap_file (max_byte_count=13197776, max_packet_count=<optimized out>, out_file_name_res=0, out_file_type=2, save_file=0x0, cf=<optimized out>) at tshark.c:3483 #6 main (argc=<optimized out>, argv=<optimized out>) at tshark.c:2192 Change-Id: I1ac813242188842130f4070ef326b12fe23b782f Reviewed-on: https://code.wireshark.org/review/15068 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
-rw-r--r--epan/addr_resolv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c
index 5b330bfa7e..6b56e8edd0 100644
--- a/epan/addr_resolv.c
+++ b/epan/addr_resolv.c
@@ -2473,6 +2473,8 @@ host_name_lookup_process(void) {
AF_INET6, c_ares_ghba_cb, caqm);
async_dns_in_flight++;
}
+
+ head = wmem_list_head(async_dns_queue_head);
}
FD_ZERO(&rfds);