mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-21 04:06:46 +00:00
159ead3b6c
every request doesn't return NFSERR_STALE. This CFS bug brought to light by the letters p, h, and k :)
21 lines
657 B
Plaintext
21 lines
657 B
Plaintext
--- cfs_fh.c.orig Sat Jul 15 01:26:30 2000
|
|
+++ cfs_fh.c Sat Jul 15 01:24:02 2000
|
|
@@ -908,7 +908,7 @@
|
|
f->name=NULL;
|
|
}
|
|
} else {
|
|
- if ((f=(cfs_fileid *)malloc(sizeof(cfs_fileid)))==NULL) {
|
|
+ if ((f=(cfs_fileid *)calloc(1, sizeof(cfs_fileid)))==NULL) {
|
|
fprintf(stderr,"cfsd: out of memory\n");
|
|
cfserrno=NFSERR_STALE; /* bad news */
|
|
return -2;
|
|
@@ -1198,7 +1198,7 @@
|
|
#endif /* SHORTLINKS */
|
|
)) == NULL) {
|
|
if ((f=(cfs_fileid *)
|
|
- malloc(sizeof(cfs_fileid)))==NULL) {
|
|
+ calloc(1, sizeof(cfs_fileid)))==NULL) {
|
|
fprintf(stderr,"cfsd: no memory\n");
|
|
cfserrno=NFSERR_STALE; /* bad news */
|
|
return -2;
|