summaryrefslogtreecommitdiff
path: root/main/file.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-09-12 16:29:01 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-09-12 16:29:01 +0000
commit8c53dd7f5eea6b00b47577a5067a492fc50dbe01 (patch)
tree8c8e6977c9844d36298c738321efc7fcfec1e77c /main/file.c
parent67f7ac04996c64d361f511c2c80bf06494358751 (diff)
Merged revisions 142740 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r142740 | tilghman | 2008-09-12 11:27:32 -0500 (Fri, 12 Sep 2008) | 4 lines Don't return a free'd pointer, when a file cannot be opened. (closes issue #13462) Reported by: wackysalut ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/file.c')
-rw-r--r--main/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main/file.c b/main/file.c
index 2f1789481..a9b36e7f5 100644
--- a/main/file.c
+++ b/main/file.c
@@ -916,6 +916,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);
ast_free(fn);