fix placement of f->fmt->close
authorAnthony Minessale II <anthmct@yahoo.com>
Mon, 20 Sep 2004 23:15:49 +0000 (23:15 +0000)
committerAnthony Minessale II <anthmct@yahoo.com>
Mon, 20 Sep 2004 23:15:49 +0000 (23:15 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3813 65c4cc65-6c06-0410-ace0-fbb531ad65f3

file.c

diff --git a/file.c b/file.c
index 02c563a..034fe1f 100755 (executable)
--- a/file.c
+++ b/file.c
@@ -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;
 }