From 043ea2ce9bbde0acb3d6dc3e51cafafba0220875 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Mon, 13 May 2013 13:59:59 +0200 Subject: [PATCH] tools/ceph.cc: close file descriptor in error case CID 717121 (#1 of 1): Resource leak (RESOURCE_LEAK) leaked_handle: Handle variable "fd" going out of scope leaks the handle. Signed-off-by: Danny Al-Gaaf --- src/tools/ceph.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/ceph.cc b/src/tools/ceph.cc index c28c1b200b3e..2859c86b1dee 100644 --- a/src/tools/ceph.cc +++ b/src/tools/ceph.cc @@ -194,6 +194,7 @@ static int get_indata(const char *in_file, bufferlist &indata) int err = errno; derr << "error getting size of in_file '" << in_file << "': " << cpp_strerror(err) << dendl; + TEMP_FAILURE_RETRY(::close(fd)); return 1; } -- 2.47.3