From: Michael Vrable Date: Tue, 30 Mar 2010 03:30:09 +0000 (-0700) Subject: Possible null pointer dereference fix. X-Git-Url: https://git.vrable.net/?a=commitdiff_plain;h=4db23448ce252728f10df967b55b2787d5fb8db5;p=bluesky.git Possible null pointer dereference fix. --- diff --git a/nfs3/nfs3.c b/nfs3/nfs3.c index ec5c736..f7e7b4e 100644 --- a/nfs3/nfs3.c +++ b/nfs3/nfs3.c @@ -996,8 +996,8 @@ void nfsproc3_readdirplus_3_svc(readdirplus3args *argp, RPCRequest *req) while (count < MAX_READDIR_DIRENTS && !g_sequence_iter_is_end(i)) { BlueSkyDirent *d = g_sequence_get(i); BlueSkyInode *inode = bluesky_get_inode(fs, d->inum); - g_mutex_lock(inode->lock); if (inode != NULL) { + g_mutex_lock(inode->lock); dircount += 24 + ((strlen(d->name) + 3) & ~3); attrcount += 88 + 8 + 8; if (dircount > argp->dircount