Prevent readFile from returning uninitialized pointer on fopen() failure.

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
This commit is contained in:
Stephen M. Cameron 2021-10-01 02:23:00 -04:00
parent ef46a97a67
commit 2d3856d3ad
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ char *getFileLocation(char *filename)
char *readFile(char *filename) char *readFile(char *filename)
{ {
char *buffer; char *buffer = NULL;
long length; long length;
FILE *file; FILE *file;