Prevent readFile from returning uninitialized pointer on fopen() failure.
Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
This commit is contained in:
parent
ef46a97a67
commit
2d3856d3ad
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue