Initialize the rootfh handle when creating the nfs context or else

we will try to free a wild pointer if the mount failed
and we proceed to call nfs_destroy_context();
libnfs-4.0.0-vitalif
Ronnie Sahlberg 2011-07-31 10:59:46 +10:00
parent b077fdeb65
commit 963c2f83be
1 changed files with 3 additions and 0 deletions

View File

@ -147,6 +147,9 @@ struct nfs_context *nfs_init_context(void)
nfs->server = NULL;
nfs->export = NULL;
nfs->rootfh.data.data_len = 0;
nfs->rootfh.data.data_val = NULL;
return nfs;
}