[ostree] deltas: Unlink temporary metadata files before processing
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] deltas: Unlink temporary metadata files before processing
- Date: Wed, 21 Jan 2015 04:23:07 +0000 (UTC)
commit d49fc876bb0b387e40c9ad11095d1d75919dd97d
Author: Colin Walters <walters verbum org>
Date: Tue Jan 20 22:59:16 2015 -0500
deltas: Unlink temporary metadata files before processing
Leaking them is bad.
.../ostree-repo-static-delta-processing.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/libostree/ostree-repo-static-delta-processing.c
b/src/libostree/ostree-repo-static-delta-processing.c
index a663b84..703a52e 100644
--- a/src/libostree/ostree-repo-static-delta-processing.c
+++ b/src/libostree/ostree-repo-static-delta-processing.c
@@ -654,6 +654,9 @@ dispatch_close (OstreeRepo *repo,
TRUE, &metadata, error))
goto out;
+ /* Now get rid of the temporary */
+ (void) unlinkat (state->repo->tmp_dir_fd, state->output_tmp_path, 0);
+
if (!ostree_repo_write_metadata (repo, state->output_objtype, tmp_checksum,
metadata, NULL, cancellable, error))
goto out;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]