aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api')
-rw-r--r--src/vpp-api/vapi/vapi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vpp-api/vapi/vapi.c b/src/vpp-api/vapi/vapi.c
index 8a9c8e3b450..ec87e7b7b72 100644
--- a/src/vpp-api/vapi/vapi.c
+++ b/src/vpp-api/vapi/vapi.c
@@ -221,6 +221,10 @@ vapi_msg_alloc (vapi_ctx_t ctx, size_t size)
return NULL;
}
void *rv = vl_msg_api_alloc_or_null (size);
+ if (rv)
+ {
+ clib_memset (rv, 0, size);
+ }
return rv;
}