From cdb212f367843cf9bcd9f9f27ab31568483100e3 Mon Sep 17 00:00:00 2001 From: jesusc Date: Sun, 6 Jul 2003 22:11:31 +0000 Subject: [PATCH] fclose FILE * != NULL git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2725 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- support/librarian/sdcclib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/support/librarian/sdcclib.c b/support/librarian/sdcclib.c index 6b191799..ef058e7a 100644 --- a/support/librarian/sdcclib.c +++ b/support/librarian/sdcclib.c @@ -204,7 +204,7 @@ void AddRel(void) if(rel==NULL) { printf("ERROR: Couldn't open file '%s'", RelName); - fclose(lib); + if(lib!=NULL) fclose(lib); return; } } @@ -214,7 +214,7 @@ void AddRel(void) if(newlib==NULL) { printf("ERROR: Couldn't create temporary file '%s'", LibNameTmp); - fclose(lib); + if(lib!=NULL) fclose(lib); fclose(rel); return; } @@ -224,7 +224,7 @@ void AddRel(void) if(libindex==NULL) { printf("ERROR: Couldn't create temporary file '%s'", IndexName); - fclose(lib); + if(lib!=NULL) fclose(lib); fclose(newlib); fclose(rel); return; -- 2.47.2