memory leak in sandbox_getaddrinfo()
Running my Tor relay under valgrind with all the config options that Yawning's sandboxed Tor Browser turns on, I see:
==18287== 125 (48 direct, 77 indirect) bytes in 1 blocks are definitely lost in loss record 30 of 64
==18287== at 0x4C28C20: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==18287== by 0x262FF7: tor_malloc_ (util.c:150)
==18287== by 0x26308D: tor_malloc_zero_ (util.c:178)
==18287== by 0x270682: sandbox_getaddrinfo (sandbox.c:1530)
==18287== by 0x250718: tor_addr_lookup (address.c:273)
==18287== by 0x256F44: tor_lookup_hostname (compat.c:2649)
==18287== by 0x1E9E0D: resolve_my_address (config.c:2421)
==18287== by 0x18E154: router_pick_published_address (router.c:1980)
==18287== by 0x190EAE: router_rebuild_descriptor (router.c:2337)
==18287== by 0x190FE5: router_get_my_routerinfo (router.c:1912)
==18287== by 0x191659: router_get_my_descriptor (router.c:1924)
==18287== by 0x191AEE: init_keys (router.c:981)
To complicate things slightly, this is the Tor from my bug20423
branch, which is commit caf742287 from close to the edge of maint-0.2.9 plus two hopefully irrelevant commits -- so I am calling the version 0.2.9.5-alpha. :)