don't dereference memory that has been freed (issue #6405)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2006-02-15 01:31:21 +00:00
parent 0aaad7b8b9
commit 6573167768

2
file.c
View File

@@ -720,11 +720,11 @@ int ast_closestream(struct ast_filestream *f)
free(f->realfilename);
f->realfilename = NULL;
}
f->fmt->close(f);
if (f->vfs) {
ast_closestream(f->vfs);
f->vfs = NULL;
}
f->fmt->close(f);
return 0;
}