]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: Stop using MTYPE_TMP in some cases
authorDonald Sharp <sharpd@nvidia.com>
Mon, 5 Dec 2022 17:10:25 +0000 (12:10 -0500)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Mon, 20 Mar 2023 08:33:37 +0000 (08:33 +0000)
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 4898cbaf1dee95f687cf6aa6d0490a336fb7dceb)

ospf6d/ospf6_lsa.c

index 779076f387f2c132794acf889bf556b38508e141..3f837f69c9a6bd9e9410d196c47b4be9d60e3d20 100644 (file)
@@ -575,7 +575,7 @@ void ospf6_lsa_show_dump(struct vty *vty, struct ospf6_lsa *lsa,
                json = json_object_new_object();
                size_t header_str_sz = (2 * (end - start)) + 1;
 
-               header_str = XMALLOC(MTYPE_TMP, header_str_sz);
+               header_str = XMALLOC(MTYPE_OSPF6_LSA_HEADER, header_str_sz);
 
                inet_ntop(AF_INET, &lsa->header->id, id, sizeof(id));
                inet_ntop(AF_INET, &lsa->header->adv_router, adv_router,
@@ -588,7 +588,7 @@ void ospf6_lsa_show_dump(struct vty *vty, struct ospf6_lsa *lsa,
                json_object_string_add(json, "header", header_str);
                json_object_array_add(json_array, json);
 
-               XFREE(MTYPE_TMP, header_str);
+               XFREE(MTYPE_OSPF6_LSA_HEADER, header_str);
        } else {
                vty_out(vty, "\n%s:\n", lsa->name);