diff --git a/openstack_tools/cmd/prometheus/routers_l3_ha.py b/openstack_tools/cmd/prometheus/routers_l3_ha.py
index 9dafb5b..0d1efd1 100644
--- a/openstack_tools/cmd/prometheus/routers_l3_ha.py
+++ b/openstack_tools/cmd/prometheus/routers_l3_ha.py
@@ -41,6 +41,8 @@ def get_pid_files(state_path):
 def verify_router_configured(router_id, master):
     """Verify is the router is properly configured on the system."""
 
+    configured = 1
+
     try:
         namespace = NetNS('qrouter-%s' % router_id)
     except OSError:
@@ -55,13 +57,15 @@ def verify_router_configured(router_id, master):
 
         # Router is not master but addresses are configured.
         if master == 0 and len(addr) != 0:
-            return 0
+            configured = 0
 
         # Router is master but addresses are not configured.
         if master == 1 and len(addr) == 0:
-            return 0
+            configured = 0
 
-    return 1
+    namespace.close()
+
+    return configured
 
 
 def main():