mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 03:18:30 +00:00
Allow codec_resample to be unloaded
Ensure that trans_size is correct to prevent uninitialized entries from
preventing reload.
(closes issue ASTERISK-21401)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
codec_resample-unload.patch uploaded by Corey Farrell
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -113,7 +113,7 @@ static int load_module(void)
|
||||
int res = 0;
|
||||
int x, y, idx = 0;
|
||||
|
||||
trans_size = ARRAY_LEN(id_list) * ARRAY_LEN(id_list);
|
||||
trans_size = ARRAY_LEN(id_list) * (ARRAY_LEN(id_list) - 1);
|
||||
if (!(translators = ast_calloc(1, sizeof(struct ast_translator) * trans_size))) {
|
||||
return AST_MODULE_LOAD_FAILURE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user