about summary refs log tree commit diff
path: root/sysdeps/generic/unwind-dw2-fde.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/unwind-dw2-fde.c')
-rw-r--r--sysdeps/generic/unwind-dw2-fde.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/generic/unwind-dw2-fde.c b/sysdeps/generic/unwind-dw2-fde.c
index 2f0bcd2ee9..104a2552b4 100644
--- a/sysdeps/generic/unwind-dw2-fde.c
+++ b/sysdeps/generic/unwind-dw2-fde.c
@@ -202,6 +202,7 @@ __deregister_frame_info_bases (void *begin)
 {
   struct object **p;
   struct object *ob = 0;
+  struct fde_vector *tofree = NULL;
 
   /* If .eh_frame is empty, we haven't registered.  */
   if (*(uword *) begin == 0)
@@ -225,7 +226,7 @@ __deregister_frame_info_bases (void *begin)
 	  {
 	    ob = *p;
 	    *p = ob->next;
-	    free (ob->u.sort);
+	    tofree = ob->u.sort;
 	    goto out;
 	  }
       }
@@ -244,6 +245,7 @@ __deregister_frame_info_bases (void *begin)
 
  out:
   __gthread_mutex_unlock (&object_mutex);
+  free (tofree);
   return (void *) ob;
 }
 hidden_def (__deregister_frame_info_bases)