From: Christian Franke <[email protected]>

original_s_route is allocated on the heap and was not freed during the
error case.

Signed-off-by: Christian Franke <[email protected]>
---
 pimd/pim_static.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pimd/pim_static.c b/pimd/pim_static.c
index cbbcaaa..4038c68 100644
--- a/pimd/pim_static.c
+++ b/pimd/pim_static.c
@@ -194,6 +194,10 @@ int pim_static_add(struct interface *iif, struct interface 
*oif, struct in_addr
          pim_static_route_free(s_route);
       }
 
+      if (original_s_route) {
+         pim_static_route_free(original_s_route);
+      }
+
       return -1;
    }
 
-- 
2.8.0


_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to