bug-libtool
[Top][All Lists]
Advanced

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

Re: [patch] Dangling Pointer in libltdl


From: Ralf Wildenhues
Subject: Re: [patch] Dangling Pointer in libltdl
Date: Mon, 29 Jan 2007 22:54:48 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

* quoting myself:
> branch-1-5:
> 2007-01-28  Dave Brolley  <address@hidden>
> 
>       * libltdl/ltdl.c (lt_dlexit): Make sure that 'cur' is not NULL
>       before checking that it is still in the list.

Darn, I royally goofed up the backport.  Applying this.

Sorry about that,
Ralf


2007-01-29  Ralf Wildenhues  <address@hidden>

        * libltdl/ltdl.c (lt_dlexit): Fix my bogus backport of Dave
        Brolley's patch from CVS HEAD.

Index: libltdl/ltdl.c
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/ltdl.c,v
retrieving revision 1.174.2.27
diff -u -r1.174.2.27 ltdl.c
--- libltdl/ltdl.c      28 Jan 2007 14:55:37 -0000      1.174.2.27
+++ libltdl/ltdl.c      29 Jan 2007 21:52:30 -0000
@@ -2341,6 +2341,13 @@
              lt_dlhandle tmp = cur;
              cur = cur->next;
              if (!LT_DLIS_RESIDENT (tmp))
+               saw_nonresident = 1;
+             if (!LT_DLIS_RESIDENT (tmp) && tmp->info.ref_count <= level)
+               {
+                 if (lt_dlclose (tmp))
+                   {
+                     ++errors;
+                   }
                  /* Make sure that the handle pointed to by 'cur' still exists.
                     lt_dlclose recursively closes dependent libraries which 
removes
                     them from the linked list.  One of these might be the one
@@ -2353,14 +2360,6 @@
                      if (! tmp)
                        cur = handles;
                    }
-
-               saw_nonresident = 1;
-             if (!LT_DLIS_RESIDENT (tmp) && tmp->info.ref_count <= level)
-               {
-                 if (lt_dlclose (tmp))
-                   {
-                     ++errors;
-                   }
                }
            }
          /* done if only resident modules are left */




reply via email to

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