aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-09-12 16:27:32 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-09-12 16:27:32 +0000
commita51fa44f103666014b208feee9e15b4f9c51531a (patch)
treeddffa33095b537170a59cde62dc8f7fd8d986914 /main
parent37ea54642638553893a0a7ae6f0075bdbd3120a6 (diff)
Don't return a free'd pointer, when a file cannot be opened.
(closes issue #13462) Reported by: wackysalut git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@142740 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main/file.c b/main/file.c
index f99b543cb..79822e652 100644
--- a/main/file.c
+++ b/main/file.c
@@ -938,6 +938,7 @@ struct ast_filestream *ast_readfile(const char *filename, const char *type, cons
ast_log(LOG_WARNING, "Unable to open %s\n", fn);
if (fs)
ast_free(fs);
+ fs = NULL;
if (bfile)
fclose(bfile);
free(fn);