Close file before return
Signed-off-by: Li Wang <[email protected]>
---
src/tools/rados/rados_sync.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/tools/rados/rados_sync.cc b/src/tools/rados/rados_sync.cc
index 03293d3..d2d6ab5 100644
--- a/src/tools/rados/rados_sync.cc
+++ b/src/tools/rados/rados_sync.cc
@@ -579,6 +579,7 @@ int BackedUpObject::download(IoCtx &io_ctx, const char
*path)
if (rlen < 0) {
cerr << ERR_PREFIX << "download: io_ctx.read(" << rados_name << ")
returned "
<< rlen << std::endl;
+ fclose(fp);
return rlen;
}
if (rlen < CHUNK_SZ)
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html