From: Sam Lang Date: Wed, 26 Sep 2012 02:11:45 +0000 (-0700) Subject: client: Fix coverity 716909 [FORWARD_NULL] X-Git-Tag: v0.53~48^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=844ffd6afff58ed28fc1d45598adac9137000b43;p=ceph.git client: Fix coverity 716909 [FORWARD_NULL] If we fill the request path from the dentry instead of the inode, we need to use the dentry inode. This fixes a segfault that would occur in the case where request->inode is in fact null. Signed-off-by: Sam Lang --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 7f4def01b4a93..67ababa818913 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -1328,7 +1328,7 @@ MClientRequest* Client::build_client_request(MetaRequest *request) request->inode->make_nosnap_relative_path(request->path); else if (request->dentry) { if (request->dentry->inode) - request->inode->make_nosnap_relative_path(request->path); + request->dentry->inode->make_nosnap_relative_path(request->path); else if (request->dentry->dir) { request->dentry->dir->parent_inode->make_nosnap_relative_path(request->path); request->path.push_dentry(request->dentry->name);