Only try to close the file if one was actually opened

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2009-01-07 22:19:47 +00:00
parent c67d152525
commit 301945890d

View File

@@ -334,7 +334,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)