Merge pull request #250 from shreyassiravara/nfs_closedir_null

Allow nfs_closedir to accept a nullptr for the nfs context
libnfs-4.0.0-vitalif
Ronnie Sahlberg 2018-04-29 10:24:01 +10:00 committed by GitHub
commit 40a8f13f0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1373,7 +1373,7 @@ nfs_rewinddir(struct nfs_context *nfs _U_, struct nfsdir *nfsdir)
void
nfs_closedir(struct nfs_context *nfs, struct nfsdir *nfsdir)
{
if (nfs->dircache_enabled) {
if (nfs && nfs->dircache_enabled) {
nfs_dircache_add(nfs, nfsdir);
} else {
nfs_free_nfsdir(nfsdir);