]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client/Client.cc: handle error if _lookup() fails 123/head
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 20 Mar 2013 16:08:42 +0000 (17:08 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 20 Mar 2013 16:08:42 +0000 (17:08 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/client/Client.cc

index e4ff7e42b767c87a44b51871fbc38032d40cc33e..b49fe150c9dc54985e937cb98f6c132e6b7ce1ce 100644 (file)
@@ -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;