Merged revisions 167545 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Wed, 7 Jan 2009 22:20:31 +0000 (22:20 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 7 Jan 2009 22:20:31 +0000 (22:20 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r167545 | russell | 2009-01-07 16:19:47 -0600 (Wed, 07 Jan 2009) | 2 lines

Only try to close the file if one was actually opened

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167546 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/file.c

index c0bc758..9729431 100644 (file)
@@ -318,7 +318,8 @@ static void filestream_destructor(void *arg)
                free(f->realfilename);
        if (f->fmt->close)
                f->fmt->close(f);
-       fclose(f->f);
+       if (f->f)
+               fclose(f->f);
        if (f->vfs)
                ast_closestream(f->vfs);
        if (f->orig_chan_name)