Fixed segfaults when fclosing a FILE* already closed.
authorjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 19 Sep 2003 05:37:34 +0000 (05:37 +0000)
committerjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 19 Sep 2003 05:37:34 +0000 (05:37 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2898 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
as/mcs51/lklibr.c
link/z80/lklibr.c

index 5bc2d441f7a1c53fc6b92cd42e8911b4775ae38f..51b6f2f2fdd7582cb3883df98fe9e4545642fef6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-09-18  Jesus Calvino-Fraga <jesusc@ece.ubc.ca>
+
+       *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
+       trying to fclose a FILE* that was already closed.  
+
 2003-09-18  Erik Petrich <epetrich@ivorytower.norman.ok.us>
 
        * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
index dbb32e82196dddc08261ac978fb7b4fa38f9409c..82d136678327c8eecf329d728da8070c14772223 100644 (file)
@@ -914,7 +914,6 @@ int buildlibraryindex(void)
                 /*Get the built in index of a library*/
                                This=buildlibraryindex_SdccLib(lbnh->libspc, libfp, str, This);
                                free(str);
-                               fclose(libfp);
                                break; /*get the index for next library*/
                        }
                 
@@ -1064,7 +1063,6 @@ char *name;
                        if(strcmp(relfil, "<SDCCLIB>")==0)
                        {
                                result=SdccLib(lbnh->libspc, libfp, str, name);
-                               fclose(libfp);
                                if(result) return(1); /*Found the symbol*/
                                free(str);
                                /*The symbol is not in the current library,
index 66b97eabcd698b1f480244fae999084b6e3d44cf..8c4132246d8f5f4c3862dec0db87802a206c1b79 100644 (file)
@@ -771,7 +771,6 @@ int buildlibraryindex(void)
                     /*Get the built in index of a library*/
                                    This=buildlibraryindex_SdccLib(lbnh->libspc, libfp, str, This);
                                    free(str);
-                                   fclose(libfp);
                                    break; /*get the index for next library*/
                            }
                 
@@ -1052,7 +1051,6 @@ char *name;
                        if(strcmp(relfil, "<SDCCLIB>")==0)
                        {
                                result=SdccLib(lbnh->libspc, libfp, str, name);
-                               fclose(libfp);
                                if(result) return(1); /*Found the symbol*/
                                free(str);
                                /*The symbol is not in the current library,