mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 22:52:04 +00:00
Fix memory leak in 'show thread cpu' command.
This commit is contained in:
parent
569c0f0188
commit
d5e86adf44
@ -328,6 +328,7 @@ thread_list_free (struct thread_master *m, struct thread_list *list)
|
|||||||
for (t = list->head; t; t = next)
|
for (t = list->head; t; t = next)
|
||||||
{
|
{
|
||||||
next = t->next;
|
next = t->next;
|
||||||
|
XFREE (MTYPE_STRVEC, t->funcname);
|
||||||
XFREE (MTYPE_THREAD, t);
|
XFREE (MTYPE_THREAD, t);
|
||||||
list->count--;
|
list->count--;
|
||||||
m->alloc--;
|
m->alloc--;
|
||||||
@ -399,7 +400,7 @@ strip_funcname (char *funcname)
|
|||||||
|
|
||||||
tmp = *e;
|
tmp = *e;
|
||||||
*e = '\0';
|
*e = '\0';
|
||||||
ret = XSTRDUP (MTYPE_TMP, b);
|
ret = XSTRDUP (MTYPE_STRVEC, b);
|
||||||
*e = tmp;
|
*e = tmp;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user