diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c index 073aaddf4c92..5dcad8a16703 100644 --- a/lib/libvmmapi/vmmapi.c +++ b/lib/libvmmapi/vmmapi.c @@ -371,6 +371,7 @@ vm_get_memseg(struct vmctx *ctx, int segid, size_t *lenp, char *namebuf, size_t n; int error; + bzero(&memseg, sizeof(memseg)); memseg.segid = segid; error = ioctl(ctx->fd, VM_GET_MEMSEG, &memseg); if (error == 0) {