Previously we were writing out the root and readme vnodes with
uninitialized 'lock' structures, when we create a new root dir for
attaching orphans. Just use calloc so we ensure that everything is
zeroed before writing it out.
Change-Id: I3c7712254aaef8731be95ea63530af05438d96a6
Reviewed-on: http://gerrit.openafs.org/2469
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
}
/* create the vnode and write it out */
- rvnode = malloc(SIZEOF_SMALLDISKVNODE);
+ rvnode = calloc(1, SIZEOF_SMALLDISKVNODE);
if (!rvnode) {
Log("CreateRootDir: error alloc'ing memory\n");
goto error;
DZap((void *)&rootdir->dirHandle);
/* create the new root dir vnode */
- rootvnode = malloc(SIZEOF_LARGEDISKVNODE);
+ rootvnode = calloc(1, SIZEOF_LARGEDISKVNODE);
if (!rootvnode) {
Log("CreateRootDir: malloc failed\n");
goto error;