diff options
author | Christian Hopps <chopps@labn.net> | 2022-02-26 13:55:32 +0100 |
---|---|---|
committer | Christian Hopps <chopps@labn.net> | 2022-03-06 13:39:58 +0100 |
commit | c85ecd64050faccd9796ff9e8b935c3b0868eb7b (patch) | |
tree | 01a8191b9bdf12dbfa7191ef7b0a3a22ec1f379d /lib/northbound_grpc.cpp | |
parent | lib: grpc: do not remove candidate entry too soon (diff) | |
download | frr-c85ecd64050faccd9796ff9e8b935c3b0868eb7b.tar.xz frr-c85ecd64050faccd9796ff9e8b935c3b0868eb7b.zip |
lib: grpc: initialize uninitialized member variables
fixes #9732, fixes #10578
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/northbound_grpc.cpp')
-rw-r--r-- | lib/northbound_grpc.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/northbound_grpc.cpp b/lib/northbound_grpc.cpp index 69669a288..2d9b61483 100644 --- a/lib/northbound_grpc.cpp +++ b/lib/northbound_grpc.cpp @@ -1,7 +1,7 @@ // +// Copyright (c) 2021-2022, LabN Consulting, L.L.C // Copyright (C) 2019 NetDEF, Inc. // Renato Westphal -// Copyright (c) 2021, LabN Consulting, L.L.C // // This program is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the Free @@ -227,7 +227,6 @@ template <typename Q, typename S> class NewRpcState : RpcStateBase pthread_mutex_unlock(&_tag->cmux); return 0; } - NewRpcState<Q, S> *orig; const char *name; grpc::ServerContext ctx; @@ -238,12 +237,12 @@ template <typename Q, typename S> class NewRpcState : RpcStateBase Candidates *cdb; void (*callback)(NewRpcState<Q, S> *); - reqfunc_t requestf; - reqsfunc_t requestsf; + reqfunc_t requestf = NULL; + reqsfunc_t requestsf = NULL; pthread_mutex_t cmux = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t cond = PTHREAD_COND_INITIALIZER; - void *context; + void *context = 0; CallState state = CREATE; }; |