summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/client_db.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api/vom/client_db.cpp')
-rw-r--r--src/vpp-api/vom/client_db.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vpp-api/vom/client_db.cpp b/src/vpp-api/vom/client_db.cpp
index fad2c13be91..41463d1dd74 100644
--- a/src/vpp-api/vom/client_db.cpp
+++ b/src/vpp-api/vom/client_db.cpp
@@ -25,7 +25,10 @@ client_db::find(const client_db::key_t& k)
void
client_db::flush(const client_db::key_t& k)
{
- m_objs.erase(m_objs.find(k));
+ auto found = m_objs.find(k);
+
+ if (found != m_objs.end())
+ m_objs.erase(found);
}
void