bug-libtool
[Top][All Lists]
Advanced

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

Re: ltdl bugs


From: Jeff Squyres
Subject: Re: ltdl bugs
Date: Sun, 3 Apr 2005 11:16:14 -0400

On Apr 3, 2005, at 10:54 AM, Jeff Squyres wrote:

Is that correct? If so, my patch actually becomes much simpler -- there's no need to cordon off the unload module stuff -- just protect the DLFREE's with if statements:

Arrgh!  Slight goof in the patch.  Here's the correct one:

-----
--- ltdl.c.orig 2005-04-03 08:49:11.000000000 -0400
+++ ltdl.c      2005-04-03 11:15:34.000000000 -0400
@@ -3798,7 +3798,7 @@
      correctly incase the user decides to reset the residency flag
      later (even though the API makes no provision for that at the
      moment).  */
-  if (handle->info.ref_count <= 0 && !LT_DLIS_RESIDENT (handle))
+  if (handle->info.ref_count <= 0)
     {
       lt_user_data data = handle->loader->dlloader_data;

@@ -3815,10 +3815,19 @@
       errors += unload_deplibs(handle);

       /* It is up to the callers to free the data itself.  */
-      LT_DLFREE (handle->caller_data);
-
-      LT_DLFREE (handle->info.filename);
-      LT_DLFREE (handle->info.name);
+      if (NULL != handle->caller_data)
+        {
+          LT_DLFREE (handle->caller_data);
+        }
+
+      if (NULL != handle->info.filename)
+        {
+          LT_DLFREE (handle->info.filename);
+        }
+      if (NULL != handle->info.name)
+        {
+          LT_DLFREE (handle->info.name);
+        }
       LT_DLFREE (handle);

       goto done;
-----

--
{+} Jeff Squyres
{+} address@hidden
{+} http://www.lam-mpi.org/





reply via email to

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