mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user