From 5dc7640d746b983e07fe3a314b2208d3806c4c31 Mon Sep 17 00:00:00 2001
From: Martin Pycko <martinp@digium.com>
Date: Mon, 11 Aug 2003 20:24:14 +0000
Subject: [PATCH] Free the translators on the ast_closestream

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 file.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/file.c b/file.c
index f0d324255f..314ad7f759 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;
-- 
GitLab