diff --git a/file.c b/file.c index f0d324255f375a4f67025b8a0088e546c9499f14..314ad7f7594b1605d51a66f005eba5f1942aae26 100755 --- a/file.c +++ b/file.c @@ -627,6 +627,11 @@ int ast_closestream(struct ast_filestream *f) f->owner->vstreamid = -1; } } + /* destroy the translator on exit */ + if (f->trans) { + ast_translator_free_path(f->trans); + f->trans = NULL; + } if (f->filename) free(f->filename); f->filename = NULL;