diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/hash.c | 2 | ||||
| -rw-r--r-- | lib/memory.c | 1 | ||||
| -rw-r--r-- | lib/memory.h | 1 | ||||
| -rw-r--r-- | lib/northbound_cli.c | 6 | ||||
| -rw-r--r-- | lib/termtable.c | 2 | ||||
| -rw-r--r-- | lib/termtable.h | 2 |
6 files changed, 8 insertions, 6 deletions
diff --git a/lib/hash.c b/lib/hash.c index df56243985..edbfeec464 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -444,7 +444,7 @@ DEFUN_NOSH(show_hash_stats, ttable_colseps(tt, 0, RIGHT, true, '|'); char *table = ttable_dump(tt, "\n"); vty_out(vty, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); } else vty_out(vty, "No named hash tables to display.\n"); diff --git a/lib/memory.c b/lib/memory.c index 8fbe5c4093..ac39516edd 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -25,6 +25,7 @@ struct memgroup **mg_insert = &mg_first; DEFINE_MGROUP(LIB, "libfrr"); DEFINE_MTYPE(LIB, TMP, "Temporary memory"); +DEFINE_MTYPE(LIB, TMP_TTABLE, "Temporary memory for TTABLE"); DEFINE_MTYPE(LIB, BITFIELD, "Bitfield memory"); static inline void mt_count_alloc(struct memtype *mt, size_t size, void *ptr) diff --git a/lib/memory.h b/lib/memory.h index 65b99a5fc9..8e8c61da04 100644 --- a/lib/memory.h +++ b/lib/memory.h @@ -138,6 +138,7 @@ struct memgroup { DECLARE_MGROUP(LIB); DECLARE_MTYPE(TMP); +DECLARE_MTYPE(TMP_TTABLE); extern void *qmalloc(struct memtype *mt, size_t size) diff --git a/lib/northbound_cli.c b/lib/northbound_cli.c index f70bae9ed2..f9794bee3c 100644 --- a/lib/northbound_cli.c +++ b/lib/northbound_cli.c @@ -1386,7 +1386,7 @@ static int nb_cli_show_transactions(struct vty *vty) table = ttable_dump(tt, "\n"); vty_out(vty, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); } else vty_out(vty, "No configuration transactions to display.\n\n"); @@ -1667,7 +1667,7 @@ DEFPY (show_yang_module, table = ttable_dump(tt, "\n"); vty_out(vty, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); } else vty_out(vty, "No YANG modules to display.\n\n"); @@ -1777,7 +1777,7 @@ DEFPY (show_yang_module_translator, table = ttable_dump(tt, "\n"); vty_out(vty, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); } else vty_out(vty, "No YANG module translators to display.\n\n"); diff --git a/lib/termtable.c b/lib/termtable.c index 88cc25bf68..ce19701389 100644 --- a/lib/termtable.c +++ b/lib/termtable.c @@ -363,7 +363,7 @@ char *ttable_dump(struct ttable *tt, const char *newline) memcpy(&right[0], newline, nl_len); /* allocate print buffer */ - buf = XCALLOC(MTYPE_TMP, width * (nlines + 1) + 1); + buf = XCALLOC(MTYPE_TMP_TTABLE, width * (nlines + 1) + 1); pos = 0; if (tt->style.border.top_on) { diff --git a/lib/termtable.h b/lib/termtable.h index 0782c82abd..d284c4f376 100644 --- a/lib/termtable.h +++ b/lib/termtable.h @@ -270,7 +270,7 @@ void ttable_rowseps(struct ttable *tt, unsigned int row, * * Caller must free this string after use with * - * XFREE (MTYPE_TMP, str); + * XFREE (MTYPE_TMP_TTABLE, str); * * @param tt the table to dump * @param newline the desired newline sequence to use, null terminated. |
