From 3daa9f6e539d82129c24dd5d9fbe499c6ee276aa Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Mon, 7 Jan 2002 22:01:50 +0000 Subject: [PATCH] tidying --- libdm/ioctl/libdevmapper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libdm/ioctl/libdevmapper.c b/libdm/ioctl/libdevmapper.c index e8f165ed7..ad005548b 100644 --- a/libdm/ioctl/libdevmapper.c +++ b/libdm/ioctl/libdevmapper.c @@ -157,6 +157,8 @@ static struct dm_ioctl *_flatten(struct dm_task *dmt) if (!(dmi = malloc(len))) return NULL; + memset(dmi, 0, len); + strncpy(dmi->version, DM_IOCTL_VERSION, sizeof(dmi->version)); dmi->data_size = len; strncpy(dmi->name, dmt->dev_name, sizeof(dmi->name));