[asterisk-bugs] [JIRA] (ASTERISK-26453) res_pjsip_config_wizard: Memory leak in module_unload
Joshua Colp (JIRA)
noreply at issues.asterisk.org
Mon Oct 10 06:13:01 CDT 2016
[ https://issues.asterisk.org/jira/browse/ASTERISK-26453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=232614#comment-232614 ]
Joshua Colp commented on ASTERISK-26453:
----------------------------------------
Everywhere else that does something like this does it in a while loop, as generally what you are storing requires a reference decrement. Example:
{noformat}
for (idx = 0; idx < AST_VECTOR_SIZE(&cap->preference_order); idx++) {
struct format_cap_framed *framed = AST_VECTOR_GET(&cap->preference_order, idx);
/* This will always be non-null, unlike formats */
ao2_ref(framed, -1);
}
AST_VECTOR_FREE(&cap->preference_order);
{noformat}
> res_pjsip_config_wizard: Memory leak in module_unload
> -----------------------------------------------------
>
> Key: ASTERISK-26453
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-26453
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Resources/res_pjsip
> Affects Versions: 13.11.2
> Reporter: Badalian Vyacheslav
> Severity: Minor
>
> Direct leak of 41 byte(s) in 1 object(s) allocated from:
> #0 0x7f50d1bbaba8 in __interceptor_malloc (/usr/local/lib64/libasan.so.3+0xc1ba8)
> #1 0x7f50bf95bb28 in _ast_malloc /usr/src/asterisk/include/asterisk/utils.h:547
> #2 0x7f50bf95bb28 in wizard_mapped_observer /usr/src/asterisk/res/res_pjsip_config_wizard.c:1138
> #3 0x77a68a in __ast_sorcery_insert_wizard_mapping /usr/src/asterisk/main/sorcery.c:1037
> #4 0x77a8f6 in __ast_sorcery_apply_wizard_mapping /usr/src/asterisk/main/sorcery.c:1047
> #5 0x77b8f9 in __ast_sorcery_object_register /usr/src/asterisk/main/sorcery.c:1174
> #6 0x7f50bf2bf68c in ast_res_pjsip_initialize_configuration res_pjsip/pjsip_configuration.c:1826
> #7 0x7f50bf29d038 in load_module /usr/src/asterisk/res/res_pjsip.c:4442
> #8 0x67441c in start_resource /usr/src/asterisk/main/loader.c:1026
> #9 0x676574 in load_resource_list /usr/src/asterisk/main/loader.c:1290
> #10 0x6774fc in load_modules /usr/src/asterisk/main/loader.c:1446
> #11 0x49444a in asterisk_daemon /usr/src/asterisk/main/asterisk.c:4615
> #12 0x493794 in main /usr/src/asterisk/main/asterisk.c:4372
> #13 0x7f50cef39b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
> Fix in gerrit
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list