mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 23:58:44 +00:00
Need to free the defunct funcname if we grab a thread from the unused list.
This commit is contained in:
parent
6898008484
commit
2946f65bb8
@ -414,7 +414,11 @@ thread_get (struct thread_master *m, u_char type,
|
|||||||
struct thread *thread;
|
struct thread *thread;
|
||||||
|
|
||||||
if (m->unuse.head)
|
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
|
else
|
||||||
{
|
{
|
||||||
thread = XCALLOC (MTYPE_THREAD, sizeof (struct thread));
|
thread = XCALLOC (MTYPE_THREAD, sizeof (struct thread));
|
||||||
@ -852,5 +856,7 @@ funcname_thread_execute (struct thread_master *m,
|
|||||||
dummy.funcname = strip_funcname (funcname);
|
dummy.funcname = strip_funcname (funcname);
|
||||||
thread_call (&dummy);
|
thread_call (&dummy);
|
||||||
|
|
||||||
|
XFREE (MTYPE_STRVEC, dummy.funcname);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user