Need to free the defunct funcname if we grab a thread from the unused list.
diff --git a/lib/thread.c b/lib/thread.c
index 2a5b806..402167c 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -414,7 +414,11 @@
   struct thread *thread;
 
   if (m->unuse.head)
-    thread = thread_trim_head (&m->unuse);
+    {
+      thread = thread_trim_head (&m->unuse);
+      if (thread->funcname)
+        XFREE(MTYPE_STRVEC, thread->funcname);
+    }
   else
     {
       thread = XCALLOC (MTYPE_THREAD, sizeof (struct thread));
@@ -852,5 +856,7 @@
   dummy.funcname = strip_funcname (funcname);
   thread_call (&dummy);
 
+  XFREE (MTYPE_STRVEC, dummy.funcname);
+
   return NULL;
 }