diff options
| author | Xin LI <delphij@FreeBSD.org> | 2011-07-29 06:16:16 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2011-07-29 06:16:16 +0000 |
| commit | 38347824ee895d37971bb9e446a631d34cf04bcc (patch) | |
| tree | b46f1861735a0468c80c200c6205f65305e512fc | |
| parent | 0d91afbfdf1da80f1f8cf5df593b1d1bbdcda55a (diff) | |
Notes
| -rw-r--r-- | usr.sbin/mountd/mountd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 79a44cd0b5b6..56757870fbce 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -1789,10 +1789,9 @@ get_exp(void) { struct exportlist *ep; - ep = (struct exportlist *)malloc(sizeof (struct exportlist)); + ep = (struct exportlist *)calloc(1, sizeof (struct exportlist)); if (ep == (struct exportlist *)NULL) out_of_mem(); - memset(ep, 0, sizeof(struct exportlist)); return (ep); } @@ -1804,10 +1803,9 @@ get_grp(void) { struct grouplist *gp; - gp = (struct grouplist *)malloc(sizeof (struct grouplist)); + gp = (struct grouplist *)calloc(1, sizeof (struct grouplist)); if (gp == (struct grouplist *)NULL) out_of_mem(); - memset(gp, 0, sizeof(struct grouplist)); return (gp); } |
