deltas: Unlink temporary metadata files before processing

Leaking them is bad.
This commit is contained in:
Colin Walters 2015-01-20 22:59:16 -05:00
parent 4991e9ab6a
commit d49fc876bb
1 changed files with 3 additions and 0 deletions

View File

@ -654,6 +654,9 @@ dispatch_close (OstreeRepo *repo,
TRUE, &metadata, error)) TRUE, &metadata, error))
goto out; 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, if (!ostree_repo_write_metadata (repo, state->output_objtype, tmp_checksum,
metadata, NULL, cancellable, error)) metadata, NULL, cancellable, error))
goto out; goto out;