==9449== Memcheck, a memory error detector ==9449== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==9449== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info ==9449== Command: asterisk -vvvvcg ==9449== ==9449== Thread 42: ==9449== Invalid read of size 4 ==9449== at 0x25B452: ast_atomic_fetchadd_int (lock.h:685) ==9449== by 0x2603B1: __ast_module_unref (loader.c:1732) ==9449== by 0x2BDA86: instance_destructor (rtp_engine.c:400) ==9449== by 0x177251: internal_ao2_ref (astobj2.c:451) ==9449== by 0x177532: __ao2_ref (astobj2.c:518) ==9449== by 0x2BDB1F: ast_rtp_instance_destroy (rtp_engine.c:407) ==9449== by 0x1681EBC3: dialog_clean_rtp (chan_sip.c:5899) ==9449== by 0x168252C2: sip_pvt_dtor (chan_sip.c:6652) ==9449== by 0x177251: internal_ao2_ref (astobj2.c:451) ==9449== by 0x177532: __ao2_ref (astobj2.c:518) ==9449== by 0x1775A3: __ao2_cleanup (astobj2.c:531) ==9449== by 0x168160D1: __dialog_unlink_sched_items (chan_sip.c:3297) ==9449== Address 0xe7bcb50 is 16 bytes inside a block of size 140 free'd ==9449== at 0x4C2CDDB: free (vg_replace_malloc.c:530) ==9449== by 0x25B995: module_destroy (loader.c:255) ==9449== by 0x25BBDA: ast_module_unregister (loader.c:278) ==9449== by 0x15FE3F8E: __unreg_module (res_rtp_asterisk.c:6801) ==9449== by 0x400FE79: _dl_fini (dl-fini.c:235) ==9449== by 0x756B90F: __run_exit_handlers (exit.c:83) ==9449== by 0x756B969: exit (exit.c:105) ==9449== by 0x16F39D: really_quit (asterisk.c:2324) ==9449== by 0x16EA1D: quit_handler (asterisk.c:2097) ==9449== by 0x16FC0E: handle_stop_now (asterisk.c:2569) ==9449== by 0x1F8440: ast_cli_command_full (cli.c:2794) ==9449== by 0x16F94F: consolehandler (asterisk.c:2501) ==9449== Block was alloc'd at ==9449== at 0x4C2DBC5: calloc (vg_replace_malloc.c:711) ==9449== by 0x25B519: _ast_calloc (utils.h:573) ==9449== by 0x25C542: load_dlopen (loader.c:571) ==9449== by 0x25C762: load_dynamic_module (loader.c:612) ==9449== by 0x25E62A: load_resource (loader.c:1184) ==9449== by 0x25EC00: load_resource_list (loader.c:1292) ==9449== by 0x25F919: load_modules (loader.c:1512) ==9449== by 0x176536: asterisk_daemon (asterisk.c:4668) ==9449== by 0x175A1F: main (asterisk.c:4421) ==9449== ==9449== ==9449== HEAP SUMMARY: ==9449== in use at exit: 16,001,870 bytes in 130,715 blocks ==9449== total heap usage: 2,416,940 allocs, 2,286,225 frees, 288,182,898 bytes allocated ==9449== ==9449== LEAK SUMMARY: ==9449== definitely lost: 0 bytes in 0 blocks ==9449== indirectly lost: 0 bytes in 0 blocks ==9449== possibly lost: 4,184,878 bytes in 18,829 blocks ==9449== still reachable: 11,816,992 bytes in 111,886 blocks ==9449== suppressed: 0 bytes in 0 blocks ==9449== Rerun with --leak-check=full to see details of leaked memory ==9449== ==9449== For counts of detected and suppressed errors, rerun with: -v ==9449== ERROR SUMMARY: 6 errors from 1 contexts (suppressed: 0 from 0)