zebra: route_unlock_node is missing in "show ip[v6] route <prefix>" commands
Signed-off-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index baa60db..1d12ac5 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -998,6 +998,8 @@
if (! rn || rn->p.prefixlen != p.prefixlen)
{
vty_out (vty, "%% Network not in table%s", VTY_NEWLINE);
+ if (rn)
+ route_unlock_node (rn);
return CMD_WARNING;
}
@@ -1897,6 +1899,8 @@
if (! rn || rn->p.prefixlen != p.prefixlen)
{
vty_out (vty, "%% Network not in table%s", VTY_NEWLINE);
+ if (rn)
+ route_unlock_node (rn);
return CMD_WARNING;
}