aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-07 22:19:47 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-07 22:19:47 +0000
commit524e17d811b3167650a11ac37a1514cb95d0b30b (patch)
tree65b3851824ffe6dacfb89349fd6f32d9d9fa0991
parent456a27841da9dd3844c2b4885a3e182604c320df (diff)
Only try to close the file if one was actually opened
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@167545 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/file.c b/main/file.c
index 65bf0dbe3..e3a9859f4 100644
--- a/main/file.c
+++ b/main/file.c
@@ -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)