summaryrefslogtreecommitdiff
path: root/lib/northbound_grpc.cpp
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2022-03-06 06:58:22 -0500
committerChristian Hopps <chopps@labn.net>2022-03-06 07:37:52 -0500
commit96d434f8530b9b096c661a7ac30fffe47f57c774 (patch)
tree0b7a48c42e1dc17bab985d945e7f1cb22d67accd /lib/northbound_grpc.cpp
parent673e4407700b90c5ecbbcec5e06fec07fc1149b1 (diff)
lib: grpc: do not remove candidate entry too soon
Fix from Rafael Zalamena <rzalamena@opensourcerouting.org> Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/northbound_grpc.cpp')
-rw-r--r--lib/northbound_grpc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/northbound_grpc.cpp b/lib/northbound_grpc.cpp
index ecab732e92..69669a288e 100644
--- a/lib/northbound_grpc.cpp
+++ b/lib/northbound_grpc.cpp
@@ -96,11 +96,11 @@ class Candidates
{
char errmsg[BUFSIZ] = {0};
- _cdb.erase(c->id);
nb_config_free(c->config);
if (c->transaction)
nb_candidate_commit_abort(c->transaction, errmsg,
sizeof(errmsg));
+ _cdb.erase(c->id);
}
struct candidate *get_candidate(uint32_t id)