+2003-08-11 NeilBrown <neilb@cse.unsw.edu.au>
+ * utils/mountd/cache.c(cache_get_filehandle): close the filehandle
+ before returning.
+
2003-08-04 NeilBrown <neilb@cse.unsw.edu.au>
* support/include/nfs/export.h, support/nfs/exports.c,
utils/exportfs/exports.c, utils/mountd/mountd.c: change
FILE *f = fopen("/proc/fs/nfsd/filehandle", "r+");
char buf[200];
char *bp = buf;
+ int failed;
static struct nfs_fh_len fh;
if (!f)
qword_printint(f, len);
qword_eol(f);
- if (fgets(buf, sizeof(buf), f) == NULL)
+ failed = (fgets(buf, sizeof(buf), f) == NULL);
+ fclose(f);
+ if (failed)
return NULL;
memset(fh.fh_handle, 0, sizeof(fh.fh_handle));
fh.fh_size = qword_get(&bp, fh.fh_handle, NFS3_FHSIZE);