From: paul Date: Wed, 12 Mar 2003 05:40:11 +0000 (+0000) Subject: Fix memory leak in 'show thread cpu' command. X-Git-Tag: frr-2.0-rc1~4139 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=d5e86adf440c26ce1d5558eac3ebda50c506f079;p=matthieu%2Ffrr.git Fix memory leak in 'show thread cpu' command. --- diff --git a/lib/thread.c b/lib/thread.c index ff8f739d76..2a5b806847 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -328,6 +328,7 @@ thread_list_free (struct thread_master *m, struct thread_list *list) for (t = list->head; t; t = next) { next = t->next; + XFREE (MTYPE_STRVEC, t->funcname); XFREE (MTYPE_THREAD, t); list->count--; m->alloc--; @@ -399,7 +400,7 @@ strip_funcname (char *funcname) tmp = *e; *e = '\0'; - ret = XSTRDUP (MTYPE_TMP, b); + ret = XSTRDUP (MTYPE_STRVEC, b); *e = tmp; return ret;