ceph: Release resource before return in BackedObject::download()
PATCH 1/1 ceph: Release resource before return in BackedObject::download()
Close file before return
Signed-off-by Li Wang <[email protected]>
--- src/tools/rados/rados_sync.cc | 1 + 1 file changed, 1 insertion(+)
src/tools/rados/rados_sync.cc +1 -0
@@ -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)
Signature · 1 line
1.7.9.5