From 844ffd6afff58ed28fc1d45598adac9137000b43 Mon Sep 17 00:00:00 2001 From: Sam Lang Date: Tue, 25 Sep 2012 19:11:45 -0700 Subject: [PATCH] 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 --- src/client/Client.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5