From 5bf0331a97731f592e81db0ff5a5d2031b65b881 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Wed, 20 Mar 2013 17:08:42 +0100 Subject: [PATCH] client/Client.cc: handle error if _lookup() fails Signed-off-by: Danny Al-Gaaf --- src/client/Client.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/client/Client.cc b/src/client/Client.cc index e4ff7e42b76..b49fe150c9d 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; -- 2.47.3