From af89c43413f773980b7bcc676f4fe50635b7418d Mon Sep 17 00:00:00 2001
From: Maria Matejka <mq@ucw.cz>
Date: Fri, 13 Dec 2024 19:10:55 +0100
Subject: [PATCH] Fixed a subtle memory leak in protocol restart routine

---
 nest/rt-attr.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/nest/rt-attr.c b/nest/rt-attr.c
index 329949c2..a0f7d571 100644
--- a/nest/rt-attr.c
+++ b/nest/rt-attr.c
@@ -342,6 +342,9 @@ rt_find_source_global(u32 id)
 static inline void
 rt_done_sources(struct rte_owner *o)
 {
+  RTA_LOCK;
+  HASH_FREE(o->hash);
+  RTA_UNLOCK;
   ev_send(o->list, o->stop);
 }