]> git.puffer.fish Git - mirror/frr.git/commitdiff
*: Create termtable specific temp memory 16711/head
authorDonald Sharp <sharpd@nvidia.com>
Fri, 30 Aug 2024 13:05:11 +0000 (09:05 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Sun, 1 Sep 2024 17:07:46 +0000 (13:07 -0400)
When trying to track down a MTYPE_TMP memory leak
it's harder to search for it when you happen to
have some usage of ttable_dump.  Let's just give
it it's own memory type so that we can avoid
confusion in the future.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
19 files changed:
bgpd/bgp_bmp.c
isisd/isis_spf.c
isisd/isis_sr.c
isisd/isis_srv6.c
lib/hash.c
lib/memory.c
lib/memory.h
lib/northbound_cli.c
lib/termtable.c
lib/termtable.h
pathd/path_cli.c
pimd/pim6_mld.c
pimd/pim_cmd_common.c
pimd/pim_rp.c
tests/lib/test_ttable.c
vrrpd/vrrp_vty.c
zebra/dplane_fpm_nl.c
zebra/zebra_mpls.c
zebra/zebra_vty.c

index 675e4765e406ddf9059d77f40c21ea64dd5afa03..44a4c0f00be3e1fed43e4a0dadd2579e2c49d818 100644 (file)
@@ -2743,7 +2743,7 @@ DEFPY(show_bmp,
                        }
                        out = ttable_dump(tt, "\n");
                        vty_out(vty, "%s", out);
-                       XFREE(MTYPE_TMP, out);
+                       XFREE(MTYPE_TMP_TTABLE, out);
                        ttable_del(tt);
 
                        vty_out(vty, "\n    %zu connected clients:\n",
@@ -2770,7 +2770,7 @@ DEFPY(show_bmp,
                        }
                        out = ttable_dump(tt, "\n");
                        vty_out(vty, "%s", out);
-                       XFREE(MTYPE_TMP, out);
+                       XFREE(MTYPE_TMP_TTABLE, out);
                        ttable_del(tt);
                        vty_out(vty, "\n");
                }
index 86302076f82d88e0bd616336dd499370d816dbcd..0f37ed012a6e8e117994b478660a7eb2f777cce5 100644 (file)
@@ -2337,7 +2337,7 @@ static void isis_print_paths(struct vty *vty, struct isis_vertex_queue *queue,
        if (json == NULL) {
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
        } else
                *json = ttable_json_with_json_text(
                        tt, "ssdsss",
@@ -3016,7 +3016,7 @@ void isis_print_routes(struct vty *vty, struct isis_spftree *spftree,
 
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
        } else if (json) {
                *json = ttable_json_with_json_text(
                        tt, prefix_sid ? "sdssdsdd" : "sdsss",
@@ -3458,7 +3458,7 @@ static void isis_print_frr_summary(struct vty *vty,
        /* Dump the generated table. */
        table = ttable_dump(tt, "\n");
        vty_out(vty, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
        ttable_del(tt);
 }
 
index f7830380064ed2ceb1f4e9a5220d3641d994e15c..71e0f56e0348edd34705e6641e982eedaec3cbae 100644 (file)
@@ -1064,7 +1064,7 @@ static void show_node(struct vty *vty, struct isis_area *area, int level,
 
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
        }
        ttable_del(tt);
 }
index b5974b1a62764575443ad4ffffd1c4960284c1e1..2348bd043a659799549bbcc09e693fd4ff6d2caf 100644 (file)
@@ -591,7 +591,7 @@ static void show_node(struct vty *vty, struct isis_area *area, int level)
 
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
        }
        ttable_del(tt);
 }
index df5624398533a5cbe9dfc8bc4c549b48797c2d47..edbfeec4645e64a6793817bba617c2f646e604cb 100644 (file)
@@ -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");
 
index 8fbe5c4093660aa50add589b1de92bd20f3e4c8d..ac39516edd75c58e203729970942dfc60a756ebe 100644 (file)
@@ -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)
index 65b99a5fc945a98901f63b0a1a61561d25b9e81c..8e8c61da04d0d0a91fc02abb01c45ba1f596bf02 100644 (file)
@@ -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)
index f70bae9ed28c0d7364312a05f8de36b142ad0df0..f9794bee3c7418417f8f86bc242f5dd0eace9dd9 100644 (file)
@@ -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");
 
index 88cc25bf68c5ba1f6e3cd6b6660e6a4fcef459e3..ce197013897ce3e282264a068fe820d843b1e05d 100644 (file)
@@ -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) {
index 0782c82abdfdd1a5291a94cd57b5379541c03e10..d284c4f3764abfa0c899fc453045b9314afa8dd1 100644 (file)
@@ -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.
index 436883c1fd8263075fe26b91132b8818f0567ee8..bf8a9ea028412316920185c605050a48e1e4c7f3 100644 (file)
@@ -131,7 +131,7 @@ DEFPY(show_srte_policy,
        /* Dump the generated table. */
        table = ttable_dump(tt, "\n");
        vty_out(vty, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        ttable_del(tt);
 
index a39d182990bf5c97c0a30b23bac3c05a387a2753..8ccf42d729bab83118549d94a931e4e285ec18eb 100644 (file)
@@ -2537,7 +2537,7 @@ static void gm_show_if_vrf(struct vty *vty, struct vrf *vrf, const char *ifname,
        if (!js && !detail) {
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
                ttable_del(tt);
        }
 }
@@ -3021,7 +3021,7 @@ static void gm_show_groups(struct vty *vty, struct vrf *vrf, bool uj)
                /* Dump the generated table. */
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
                ttable_del(tt);
        }
 }
index d1368ff1ffe496fc13b06fdec1b4cd89fababa12..a87f5b6981842c03ef7157353c678168893086ca 100644 (file)
@@ -874,7 +874,7 @@ void pim_show_rpf(struct pim_instance *pim, struct vty *vty, json_object *json)
        if (!json) {
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
                ttable_del(tt);
        }
 }
@@ -926,7 +926,7 @@ void pim_show_neighbors_secondary(struct pim_instance *pim, struct vty *vty)
        /* Dump the generated table. */
        table = ttable_dump(tt, "\n");
        vty_out(vty, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
        ttable_del(tt);
 }
 
@@ -1180,7 +1180,7 @@ void pim_show_state(struct pim_instance *pim, struct vty *vty,
 #else
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
                ttable_del(tt);
 #endif
        }
@@ -1413,7 +1413,7 @@ void pim_show_upstream(struct pim_instance *pim, struct vty *vty,
        if (!json) {
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
                ttable_del(tt);
        }
 }
@@ -1490,7 +1490,7 @@ void pim_show_join_desired(struct pim_instance *pim, struct vty *vty, bool uj)
                /* Dump the generated table. */
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
                ttable_del(tt);
        }
 }
@@ -1569,7 +1569,7 @@ void pim_show_upstream_rpf(struct pim_instance *pim, struct vty *vty, bool uj)
                /* Dump the generated table. */
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
                ttable_del(tt);
        }
 }
@@ -1751,7 +1751,7 @@ void pim_show_join(struct pim_instance *pim, struct vty *vty, pim_sgaddr *sg,
        if (!json) {
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
                ttable_del(tt);
        }
 }
@@ -1831,7 +1831,7 @@ void pim_show_jp_agg_list(struct pim_instance *pim, struct vty *vty)
        /* Dump the generated table. */
        table = ttable_dump(tt, "\n");
        vty_out(vty, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
        ttable_del(tt);
 }
 
@@ -1974,7 +1974,7 @@ void pim_show_membership(struct pim_instance *pim, struct vty *vty, bool uj)
                /* Dump the generated table. */
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
                ttable_del(tt);
        }
 }
@@ -2079,7 +2079,7 @@ void pim_show_channel(struct pim_instance *pim, struct vty *vty, bool uj)
                /* Dump the generated table. */
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
                ttable_del(tt);
        }
 }
@@ -2262,7 +2262,7 @@ void pim_show_interfaces(struct pim_instance *pim, struct vty *vty, bool mlag,
                /* Dump the generated table. */
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
 
                ttable_del(tt);
        }
@@ -2734,7 +2734,7 @@ static int pim_print_vty_pnc_cache_walkcb(struct hash_bucket *bucket, void *arg)
        /* Dump the generated table. */
        table = ttable_dump(tt, "\n");
        vty_out(vty, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
        ttable_del(tt);
 
        return CMD_SUCCESS;
@@ -3214,7 +3214,7 @@ void pim_show_neighbors(struct pim_instance *pim, struct vty *vty,
        if (!json) {
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
                ttable_del(tt);
        }
 }
@@ -3500,7 +3500,7 @@ void show_multicast_interfaces(struct pim_instance *pim, struct vty *vty,
        if (!json) {
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
                ttable_del(tt);
        }
 }
@@ -3939,7 +3939,7 @@ void show_mroute(struct pim_instance *pim, struct vty *vty, pim_sgaddr *sg,
        if (!json) {
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
                ttable_del(tt);
        }
 }
@@ -4022,7 +4022,7 @@ void show_mroute_count(struct pim_instance *pim, struct vty *vty,
        if (!json) {
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
                ttable_del(tt);
        }
 }
@@ -5325,7 +5325,7 @@ static void pim_show_group_rp_mappings_info(struct pim_instance *pim,
 
                        table = ttable_dump(tt, "\n");
                        vty_out(vty, "%s\n", table);
-                       XFREE(MTYPE_TMP, table);
+                       XFREE(MTYPE_TMP_TTABLE, table);
                        ttable_del(tt);
                        tt = NULL;
                }
@@ -5379,7 +5379,7 @@ static void pim_show_group_rp_mappings_info(struct pim_instance *pim,
 
                        table = ttable_dump(tt, "\n");
                        vty_out(vty, "%s\n", table);
-                       XFREE(MTYPE_TMP, table);
+                       XFREE(MTYPE_TMP_TTABLE, table);
                        ttable_del(tt);
                }
                if (!bsm_rpinfos_count(bsgrp->partial_bsrp_list) && !uj)
index 0f8940bb16d7ea1098d1717eac7b92236797ca65..a2ddc82164a24e1091fc5fd561c593d04c798fe7 100644 (file)
@@ -1272,7 +1272,7 @@ void pim_rp_show_information(struct pim_instance *pim, struct prefix *range,
        if (!json) {
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
-               XFREE(MTYPE_TMP, table);
+               XFREE(MTYPE_TMP_TTABLE, table);
                ttable_del(tt);
        } else {
                if (prev_rp_info && json_rp_rows)
index 562ddf9d66e31c5834ce3470e5147cb5ecfe5b1a..7ac0e3516b0b0a8d7931d0083ef0f77f73274bb0 100644 (file)
@@ -20,7 +20,7 @@ int main(int argc, char **argv)
        assert(tt->nrows == 1);
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        /* add new row with 1 column, assert that it is not added */
        assert(ttable_add_row(tt, "%s", "Garbage") == NULL);
@@ -28,7 +28,7 @@ int main(int argc, char **argv)
        assert(tt->nrows == 1);
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        /* add new row, assert that it is added */
        assert(ttable_add_row(tt, "%s|%s|%s", "a", "b", "c"));
@@ -36,7 +36,7 @@ int main(int argc, char **argv)
        assert(tt->nrows == 2);
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        /* add empty row, assert that it is added */
        assert(ttable_add_row(tt, "||"));
@@ -44,7 +44,7 @@ int main(int argc, char **argv)
        assert(tt->nrows == 3);
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        /* delete 1st row, assert that it is removed */
        ttable_del_row(tt, 0);
@@ -52,7 +52,7 @@ int main(int argc, char **argv)
        assert(tt->nrows == 2);
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        /* delete last row, assert that it is removed */
        ttable_del_row(tt, 0);
@@ -60,7 +60,7 @@ int main(int argc, char **argv)
        assert(tt->nrows == 1);
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        /* delete the remaining row, check dumping an empty table */
        ttable_del_row(tt, 0);
@@ -68,7 +68,7 @@ int main(int argc, char **argv)
        assert(tt->nrows == 0);
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        /* add new row */
        ttable_add_row(tt, "%s|%s||%s|%9d", "slick", "black", "triple", 1337);
@@ -76,7 +76,7 @@ int main(int argc, char **argv)
        assert(tt->nrows == 1);
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        /* add bigger row */
        ttable_add_row(tt, "%s|%s||%s|%s",
@@ -86,7 +86,7 @@ int main(int argc, char **argv)
        assert(tt->nrows == 2);
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        /* insert new row at beginning */
        ttable_insert_row(tt, 0, "%s|%s||%d|%lf", "converting", "vegetarians",
@@ -95,7 +95,7 @@ int main(int argc, char **argv)
        assert(tt->nrows == 3);
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        /* insert new row at end */
        ttable_insert_row(tt, tt->nrows - 1, "%s|%s||%d|%ld", "converting",
@@ -104,7 +104,7 @@ int main(int argc, char **argv)
        assert(tt->nrows == 4);
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        /* insert new row at middle */
        ttable_insert_row(tt, 1, "%s|%s||%s|%ld", "she", "pioneer", "aki", 1l);
@@ -112,7 +112,7 @@ int main(int argc, char **argv)
        assert(tt->nrows == 5);
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        /* set alignment */
        ttable_align(tt, 0, 1, 2, 2, LEFT);
@@ -120,14 +120,14 @@ int main(int argc, char **argv)
        assert(tt->nrows == 5);
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        ttable_align(tt, 0, 1, 5, 1, RIGHT);
        assert(tt->ncols == 5);
        assert(tt->nrows == 5);
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        /* set padding */
        ttable_pad(tt, 0, 1, 1, 1, RIGHT, 2);
@@ -135,14 +135,14 @@ int main(int argc, char **argv)
        assert(tt->nrows == 5);
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        ttable_pad(tt, 0, 0, 5, 4, LEFT, 2);
        assert(tt->ncols == 5);
        assert(tt->nrows == 5);
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        /* restyle */
        tt->style.cell.border.bottom_on = false;
@@ -156,13 +156,13 @@ int main(int argc, char **argv)
        ttable_rowseps(tt, 1, TOP, true, '-');
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        /* column separators for leftmost column */
        ttable_colseps(tt, 0, RIGHT, true, '|');
        table = ttable_dump(tt, "\n");
        fprintf(stdout, "%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
 
        /* delete table */
        ttable_del(tt);
index 985354af370aa601920979f26f18cb763dc69eb3..59794d929787b79c991d335dcbc72cf7e444882c 100644 (file)
@@ -590,7 +590,7 @@ static void vrrp_show(struct vty *vty, struct vrrp_vrouter *vr)
        char *table = ttable_dump(tt, "\n");
 
        vty_out(vty, "\n%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
        ttable_del(tt);
 }
 
@@ -695,7 +695,7 @@ DEFPY_YANG(vrrp_vrid_show_summary,
        char *table = ttable_dump(tt, "\n");
 
        vty_out(vty, "\n%s\n", table);
-       XFREE(MTYPE_TMP, table);
+       XFREE(MTYPE_TMP_TTABLE, table);
        ttable_del(tt);
 
        list_delete(&ll);
index 09080aa6164d678219a168992206d683c10cfb7a..eb968bcd372a4af89048b064c01bed9fd40cdfeb 100644 (file)
@@ -381,7 +381,7 @@ DEFPY(fpm_show_status,
 
                out = ttable_dump(table, "\n");
                vty_out(vty, "%s\n", out);
-               XFREE(MTYPE_TMP, out);
+               XFREE(MTYPE_TMP_TTABLE, out);
 
                ttable_del(table);
        }
index d1c9cd54affc3f4796c258967b9caf034f56b118..086150fb04c9d5d51794fb028a92a9a6fc4be035 100644 (file)
@@ -3794,7 +3794,7 @@ void zebra_mpls_print_lsp_table(struct vty *vty, struct zebra_vrf *zvrf,
                if (tt->nrows > 1) {
                        char *table = ttable_dump(tt, "\n");
                        vty_out(vty, "%s\n", table);
-                       XFREE(MTYPE_TMP, table);
+                       XFREE(MTYPE_TMP_TTABLE, table);
                }
                ttable_del(tt);
        }
index 0459781efd4bfd98957479db1e22473fee936adb..501e9d52683496f9515b323904b0feeb3a20226e 100644 (file)
@@ -3917,7 +3917,7 @@ DEFUN (show_zebra,
 
        out = ttable_dump(table, "\n");
        vty_out(vty, "%s\n", out);
-       XFREE(MTYPE_TMP, out);
+       XFREE(MTYPE_TMP_TTABLE, out);
 
        ttable_del(table);
        vty_out(vty,