diff options
author | David Lamparter <equinox@diac24.net> | 2017-08-04 08:46:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-04 08:46:38 +0200 |
commit | f28762d2359626b635eb9e05b38d4cd90b539d42 (patch) | |
tree | 7fec8dfd43a209c5f5b7457df26ad75bf40e59b4 /ospf6d/ospf6_lsa.c | |
parent | Merge pull request #901 from qlyoung/style-fix (diff) | |
parent | ospf6d: adjust changes per PR 870 review (diff) | |
download | frr-f28762d2359626b635eb9e05b38d4cd90b539d42.tar.xz frr-f28762d2359626b635eb9e05b38d4cd90b539d42.zip |
Merge pull request #870 from chiragshah6/mdev
Fix various memory leaks in OSPFd and OSPF6d
Diffstat (limited to 'ospf6d/ospf6_lsa.c')
-rw-r--r-- | ospf6d/ospf6_lsa.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index e1a431ea0..a0dad9344 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -509,7 +509,8 @@ struct ospf6_lsa *ospf6_lsa_create(struct ospf6_lsa_header *header) /* allocate memory for this LSA */ new_header = - (struct ospf6_lsa_header *)XMALLOC(MTYPE_OSPF6_LSA, lsa_size); + (struct ospf6_lsa_header *)XMALLOC(MTYPE_OSPF6_LSA_HEADER, + lsa_size); /* copy LSA from original header */ memcpy(new_header, header, lsa_size); @@ -537,7 +538,7 @@ struct ospf6_lsa *ospf6_lsa_create_headeronly(struct ospf6_lsa_header *header) /* allocate memory for this LSA */ new_header = (struct ospf6_lsa_header *)XMALLOC( - MTYPE_OSPF6_LSA, sizeof(struct ospf6_lsa_header)); + MTYPE_OSPF6_LSA_HEADER, sizeof(struct ospf6_lsa_header)); /* copy LSA from original header */ memcpy(new_header, header, sizeof(struct ospf6_lsa_header)); @@ -568,7 +569,7 @@ void ospf6_lsa_delete(struct ospf6_lsa *lsa) THREAD_OFF(lsa->refresh); /* do free */ - XFREE(MTYPE_OSPF6_LSA, lsa->header); + XFREE(MTYPE_OSPF6_LSA_HEADER, lsa->header); XFREE(MTYPE_OSPF6_LSA, lsa); } |