diff options
author | Corey Farrell <git@cfware.com> | 2018-01-04 11:50:13 -0500 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2018-01-04 12:01:56 -0500 |
commit | 82cf585fb5fb52c848915d6b4730c80765c5a4d5 (patch) | |
tree | 5e6d978f197a2a3da51e1a58b738bce9a9197eae /main/translate.c | |
parent | 2fac32a37adbe92922212e17f2989cf1b0333832 (diff) |
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
Diffstat (limited to 'main/translate.c')
-rw-r--r-- | main/translate.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/main/translate.c b/main/translate.c index 3d4905723..02717c5ed 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)) { |