memory leak in trusted_dirs_load_certs_from_string
==25743== 4,490 (3,978 direct, 512 indirect) bytes in 10 blocks are definitely l ost in loss record 7 of 9 ==25743== at 0x401D38B: malloc (vg_replace_malloc.c:149) ==25743== by 0x80EBB6C: _tor_malloc (util.c:112) ==25743== by 0x80DDCC3: authority_cert_parse_from_string (routerparse.c:1496) ==25743== by 0x80CD999: trusted_dirs_load_certs_from_string (routerlist.c:113 ) ==25743== by 0x80CD946: trusted_dirs_reload_certs (routerlist.c:96) ==25743== by 0x80B01D4: do_main_loop (main.c:1347) ==25743== by 0x80B1766: tor_main (main.c:1932) ==25743== by 0x80EABB5: main (tor_main.c:28)
Looking at trusted_dirs_load_certs_from_string(), towards the bottom it calls cert->cache_info.signed_descriptor_body = tor_strndup(s, eos-s);
yet in authority_cert_parse_from_string() we already cert->cache_info.signed_descriptor_body = tor_malloc(len+1); memcpy(cert->cache_info.signed_descriptor_body, s, len); cert->cache_info.signed_descriptor_body[len] = 0;
It seems that we should do only one of these?
[Automatically added by flyspray2trac: Operating System: All]