From d7e04f987f8de849acb85a4502d44c17bc4bead8 Mon Sep 17 00:00:00 2001 From: Crayon2000 Date: Wed, 1 Sep 2010 22:55:02 +0000 Subject: [PATCH] [CHG] Possible resource leak --- GRRLIB/GRRLIB/GRRLIB_fileIO.c | 1 + 1 file changed, 1 insertion(+) diff --git a/GRRLIB/GRRLIB/GRRLIB_fileIO.c b/GRRLIB/GRRLIB/GRRLIB_fileIO.c index 63ed924..062c0bf 100644 --- a/GRRLIB/GRRLIB/GRRLIB_fileIO.c +++ b/GRRLIB/GRRLIB/GRRLIB_fileIO.c @@ -48,6 +48,7 @@ int GRRLIB_LoadFile(const char* filename, unsigned char* *data) { // Get file length fseek(fd, 0, SEEK_END); if ( !(len = ftell(fd)) ) { + fclose(fd); *data = NULL; return 0; }