libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: HEAD: avoid double fclose in OOM situation


From: Ralf Wildenhues
Subject: FYI: HEAD: avoid double fclose in OOM situation
Date: Thu, 30 Aug 2007 20:23:30 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

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  <address@hidden>

        * 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;
            }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]