From: Tilghman Lesher Date: Fri, 12 Sep 2008 16:27:32 +0000 (+0000) Subject: Don't return a free'd pointer, when a file cannot be opened. X-Git-Tag: 1.4.23-rc1~90 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8dfa8b6d0eef06671a39ba58d3a33b26dfd1c4b4;p=thirdparty%2Fasterisk.git 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/branches/1.4@142740 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/file.c b/main/file.c index f99b543cb3..79822e652d 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);