diff options
author | Reuben Thomas <rrt@sc3d.org> | 2007-12-10 17:04:11 +0000 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2007-12-10 17:04:11 +0000 |
commit | 9a7497a68981ec91231c8cf46614cda832d3444b (patch) | |
tree | 8d696103335978d07fd33459660e18bf31984e07 /plpnfsd/mp_pfs_ops.c | |
parent | 8d246b0f0820b887a0a5e7751fcbeba7456f0bb9 (diff) | |
download | plptools-9a7497a68981ec91231c8cf46614cda832d3444b.tar.gz plptools-9a7497a68981ec91231c8cf46614cda832d3444b.tar.bz2 plptools-9a7497a68981ec91231c8cf46614cda832d3444b.zip |
Zero dentries when allocating them
Diffstat (limited to 'plpnfsd/mp_pfs_ops.c')
-rw-r--r-- | plpnfsd/mp_pfs_ops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plpnfsd/mp_pfs_ops.c b/plpnfsd/mp_pfs_ops.c index 87925fe..7dcba5a 100644 --- a/plpnfsd/mp_pfs_ops.c +++ b/plpnfsd/mp_pfs_ops.c @@ -145,7 +145,7 @@ long generic_getdents(builtin_node *node, dentry **e) { while (cp) { if ((cp->node->flags & BF_EXISTS_ALWAYS) || rfsv_isalive()) { - dentry *tmp = (dentry *)malloc(sizeof(dentry)); + dentry *tmp = (dentry *)calloc(1, sizeof(dentry)); if (!tmp) return -1; tmp->time = time(0); @@ -210,7 +210,7 @@ static long proc_getdents(builtin_node *node, dentry **e) { while (cp) { if ((cp->node->flags & BF_EXISTS_ALWAYS) || rfsv_isalive()) { - dentry *tmp = (dentry *)malloc(sizeof(dentry)); + dentry *tmp = (dentry *)calloc(1, sizeof(dentry)); if (!tmp) return -1; tmp->time = time(0); |