summaryrefslogtreecommitdiffstats
path: root/vlib-api/vlibapi
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-01-05 10:01:41 -0500
committerDave Barach <dave@barachs.net>2017-01-05 10:04:30 -0500
commitb95a916dc335096257ed2fbdd913d4ac44471308 (patch)
tree6d3a06a5857404de95e21a662ffc627361d10c6b /vlib-api/vlibapi
parent235c64f0678165a2cddee67514052d4bc2bedadb (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. Change-Id: I11084dd884622e7b44bdabb922466c4d07138235 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vlib-api/vlibapi')
-rw-r--r--vlib-api/vlibapi/api_shared.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vlib-api/vlibapi/api_shared.c b/vlib-api/vlibapi/api_shared.c
index 6a04fac92f4..18067d1d85e 100644
--- a/vlib-api/vlibapi/api_shared.c
+++ b/vlib-api/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;