From: Danny Al-Gaaf Date: Wed, 20 Mar 2013 16:08:42 +0000 (+0100) Subject: client/Client.cc: handle error if _lookup() fails X-Git-Tag: v0.60~29^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5bf0331a97731f592e81db0ff5a5d2031b65b881;p=ceph.git client/Client.cc: handle error if _lookup() fails Signed-off-by: Danny Al-Gaaf --- diff --git a/src/client/Client.cc b/src/client/Client.cc index e4ff7e42b767..b49fe150c9dc 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -7196,6 +7196,8 @@ int Client::_unlink(Inode *dir, const char *name, int uid, int gid) Inode *otherin; res = _lookup(dir, name, &otherin); + if (res < 0) + goto fail; req->set_other_inode(otherin); req->other_inode_drop = CEPH_CAP_LINK_SHARED | CEPH_CAP_LINK_EXCL;