Free the translators on the ast_closestream

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Martin Pycko
2003-08-11 20:24:14 +00:00
parent d2e8557038
commit 5dc7640d74

5
file.c
View File

@@ -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;