summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorManoj Naragund <mnaragund@vmware.com>2023-03-23 13:59:38 +0100
committerManoj Naragund <mnaragund@vmware.com>2023-03-23 13:59:38 +0100
commit1746f71bc81194b0f4f03bf42ac6af3788fece76 (patch)
tree3c379ddaf9bf8878bd47c4ae579f59ee1aeed852 /ospfd
parentMerge pull request #13074 from donaldsharp/hash_clean_and_free (diff)
downloadfrr-1746f71bc81194b0f4f03bf42ac6af3788fece76.tar.xz
frr-1746f71bc81194b0f4f03bf42ac6af3788fece76.zip
ospfd: Fix for memory leak issue in ospf related to flood_reduction tests.
Problem: Multiple memory leaks after pr12366 RCA: ospf_lsa_unlock was not happening for the few of the LSAs in ospf_lsa_refresh_walker after pr12366 due to which memory related to lsas was leaking. Fix: Moved the ospf_lsa_unlock outside if check. Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_lsa.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index f41e303ef..da014bd02 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -4099,11 +4099,11 @@ void ospf_lsa_refresh_walker(struct thread *t)
dna_lsa = ospf_check_dna_lsa(lsa);
if (!dna_lsa) { /* refresh only non-DNA LSAs */
ospf_lsa_refresh(ospf, lsa);
- assert(lsa->lock > 0);
- ospf_lsa_unlock(&lsa); /* lsa_refresh_queue & temp for
- * lsa_to_refresh.
- */
}
+ assert(lsa->lock > 0);
+ ospf_lsa_unlock(&lsa); /* lsa_refresh_queue & temp for
+ * lsa_to_refresh.
+ */
}
list_delete(&lsa_to_refresh);