From 133d9301320cf4724314e3a422fde530cf4ad206 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Fri, 30 Jun 2023 19:23:24 +0900 Subject: [PATCH] Fix up some error paths Found via clang-tidy. --- ll_shadow_ops.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ll_shadow_ops.cc b/ll_shadow_ops.cc index 5b3a74e..76e19ae 100644 --- a/ll_shadow_ops.cc +++ b/ll_shadow_ops.cc @@ -608,6 +608,10 @@ shadow_ll_link(fuse_req_t req, fuse_ino_t ino, fuse_ino_t newparent, std::string newpath; int err = resolve_path(newparent, newname, &newpath); + if (err != 0) { + fuse_reply_err(req, err); + return; + } std::string local_path1 = DATA_DIR + state->path_; std::string local_path2 = DATA_DIR + newpath; @@ -708,6 +712,7 @@ shadow_ll_release(fuse_req_t req, fuse_ino_t ino, if (!state) { dsyslog("release(%lu)... no inode in map\n", ino); fuse_reply_err(req, ENOENT); + return; } if (state->local_fd_ == 0) {