]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't return a free'd pointer, when a file cannot be opened.
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 12 Sep 2008 16:27:32 +0000 (16:27 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 12 Sep 2008 16:27:32 +0000 (16:27 +0000)
(closes issue #13462)
 Reported by: wackysalut

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142740 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/file.c

index f99b543cb35224717741a5372d9a13b9ebe61af5..79822e652d6249c545c1d7aa6f7850ccb23e4ef4 100644 (file)
@@ -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);