aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/file.c b/file.c
index f0d324255..314ad7f75 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;