From 82cf585fb5fb52c848915d6b4730c80765c5a4d5 Mon Sep 17 00:00:00 2001 From: Corey Farrell Date: Thu, 4 Jan 2018 11:50:13 -0500 Subject: [PATCH] translators: Don't use ast_module_running_ref. Translators are run during module load before the module is actually running, so it cannot use ast_module_running_ref. ASTERISK-20346 Change-Id: Iaa0e75da99c696e38000f1a41e340abbd7a88f56 --- main/translate.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/main/translate.c b/main/translate.c index 3d4905723c..02717c5ed1 100644 --- a/main/translate.c +++ b/main/translate.c @@ -342,10 +342,7 @@ static struct ast_trans_pvt *newpvt(struct ast_translator *t, struct ast_format */ pvt->explicit_dst = ao2_bump(explicit_dst); - if (!ast_module_running_ref(t->module)) { - ast_free(pvt); - return NULL; - } + ast_module_ref(t->module); /* call local init routine, if present */ if (t->newpvt && t->newpvt(pvt)) {