summaryrefslogtreecommitdiffstats
path: root/src/vlibapi/api_shared.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-01-05 10:08:52 -0500
committerOle Trøan <otroan@employees.org>2017-01-05 17:03:15 +0000
commit0691d6e9ff4388dc85e150c40bbc877bb74c02b1 (patch)
tree2f7339ce94bc07bdf9179f7bf18972a9bcf6f6f7 /src/vlibapi/api_shared.c
parentc0790cfef0bd1c56f4c75dc4f959584148386258 (diff)
Fix uninitialized stack local, VPP-581
Sporadically messes up the client message allocation ring, by setting c->message_bounce[msg_id] non-zero. A day-1 bug, made blatantly obvious by the python API language binding for no particular reason. Manually cherry-picked from stable/1701 due to the recent tree reorganization. Change-Id: Ifa03c5487436cbe50a6204db48fd9ce4938e32bb Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlibapi/api_shared.c')
-rw-r--r--src/vlibapi/api_shared.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vlibapi/api_shared.c b/src/vlibapi/api_shared.c
index 6a04fac92f4..18067d1d85e 100644
--- a/src/vlibapi/api_shared.c
+++ b/src/vlibapi/api_shared.c
@@ -691,6 +691,8 @@ vl_msg_api_set_handlers (int id, char *name, void *handler, void *cleanup,
vl_msg_api_msg_config_t cfg;
vl_msg_api_msg_config_t *c = &cfg;
+ memset (c, 0, sizeof (*c));
+
c->id = id;
c->name = name;
c->handler = handler;