The caller try_dlopen closes the .la file, and if the line is longer
than available memory, then erroneously, parse_dotla_file also closes
the file. Applied to HEAD; I introduced that bug there while factoring
out parse_dotla_file, so it's not present in branch-1-5.
Cheers,
Ralf
2007-08-30 Ralf Wildenhues <[EMAIL PROTECTED]>
* libltdl/ltdl.c (parse_dotla_file): If we run out of memory,
do not close the .la file twice.
Coverity report CID 440 via Jeff Squyres.
Index: libltdl/ltdl.c
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/ltdl.c,v
retrieving revision 1.257
diff -u -r1.257 ltdl.c
--- libltdl/ltdl.c 30 Aug 2007 18:18:31 -0000 1.257
+++ libltdl/ltdl.c 30 Aug 2007 18:21:24 -0000
@@ -1031,7 +1031,6 @@
line = REALLOC (char, line, line_len *2);
if (!line)
{
- fclose (file);
++errors;
goto cleanup;
}