From 96d434f8530b9b096c661a7ac30fffe47f57c774 Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Sun, 6 Mar 2022 06:58:22 -0500 Subject: [PATCH] lib: grpc: do not remove candidate entry too soon Fix from Rafael Zalamena Signed-off-by: Christian Hopps --- lib/northbound_grpc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.5