LeakSanitizer detected memory leak with Tor 0.4.4.0-alpha-dev (git-6472d9cf)
I hit a memory leak with the latest tor
code from master
when using it in Tor Browser.
Direct leak of 112 byte(s) in 2 object(s) allocated from:
#0 0x7fdee552d628 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x107628)
#1 0x55e7f567b5fa in tor_malloc_ ../src/lib/malloc/malloc.c:45
#2 0x55e7f567b690 in tor_malloc_zero_ ../src/lib/malloc/malloc.c:71
#3 0x55e7f5478339 in cache_client_desc_new ../src/feature/hs/hs_cache.c:429
#4 0x55e7f5478339 in hs_cache_store_as_client ../src/feature/hs/hs_cache.c:830
#5 0x55e7f5487e50 in client_dir_fetch_200 ../src/feature/hs/hs_client.c:1372
#6 0x55e7f5487e50 in hs_client_dir_fetch_done ../src/feature/hs/hs_client.c:2264
#7 0x55e7f54445fa in handle_response_fetch_hsdesc_v3 ../src/feature/dirclient/dirclient.c:2776
#8 0x55e7f54445fa in connection_dir_client_reached_eof ../src/feature/dirclient/dirclient.c:2202
#9 0x55e7f54445fa in connection_dir_reached_eof ../src/feature/dirclient/dirclient.c:2989
#10 0x55e7f52e5505 in connection_reached_eof ../src/core/mainloop/connection.c:5029
#11 0x55e7f52e5505 in connection_handle_read_impl ../src/core/mainloop/connection.c:3776
#12 0x55e7f52e5505 in connection_handle_read ../src/core/mainloop/connection.c:3788
#13 0x55e7f52f18e0 in conn_read_callback ../src/core/mainloop/mainloop.c:892
#14 0x7fdee528eb0e (/usr/lib/x86_64-linux-gnu/libevent-2.1.so.7+0x23b0e)
I've attached all the direct/indirect leaks that LeakSanitizer gave me, in case there is more lurking.