Skip to content

Commit

Permalink
mds: Release resource before return
Browse files Browse the repository at this point in the history
Close file before return.
Fix coverity issue: CID 1019571

Signed-off-by: Li Wang <[email protected]>
Reported-by: Xianxia Xiao <[email protected]>
Reviewed-by: Josh Durgin <[email protected]>
  • Loading branch information
dragonylffly authored and jdurgin committed Nov 25, 2013
1 parent 524f666 commit 784d188
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mds/MDCache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11731,7 +11731,7 @@ void MDCache::dump_cache(const char *fn)
std::string s = ss.str();
r = safe_write(fd, s.c_str(), s.length());
if (r < 0)
return;
goto out;

list<CDir*> dfs;
in->get_dirfrags(dfs);
Expand Down

0 comments on commit 784d188

Please sign in to comment.