fix placement of f->fmt->close

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Anthony Minessale II 2004-09-20 23:15:49 +00:00
parent 45a157ec0e
commit 42806dc1ac
1 changed files with 2 additions and 2 deletions

4
file.c
View File

@ -683,7 +683,7 @@ int ast_closestream(struct ast_filestream *f)
snprintf(cmd,size,"/bin/mv -f %s %s",f->filename,f->realfilename);
ast_safe_system(cmd);
}
f->fmt->close(f);
if (f->filename) {
free(f->filename);
f->filename = NULL;
@ -692,7 +692,7 @@ int ast_closestream(struct ast_filestream *f)
free(f->realfilename);
f->realfilename = NULL;
}
f->fmt->close(f);
return 0;
}