checkout: Fix leak when doing uncompressed cache + copying checkouts

We were reading into "input" twice, leading a fd.  This was
breaking the gnome-continuous integrationtest.
This commit is contained in:
Colin Walters 2013-09-13 17:14:35 -04:00
parent 94e42c521c
commit d302c3d7ff
1 changed files with 3 additions and 1 deletions

View File

@ -423,7 +423,7 @@ checkout_one_file_at (OstreeRepo *repo,
&& mode == OSTREE_REPO_CHECKOUT_MODE_USER
&& repo->enable_uncompressed_cache)
{
if (!ostree_repo_load_file (repo, checksum, &input, NULL, &xattrs,
if (!ostree_repo_load_file (repo, checksum, &input, NULL, NULL,
cancellable, error))
goto out;
@ -437,6 +437,8 @@ checkout_one_file_at (OstreeRepo *repo,
g_prefix_error (error, "Unpacking loose object %s: ", checksum);
goto out;
}
g_clear_object (&input);
/* Store the 2-byte objdir prefix (e.g. e3) in a set. The basic
* idea here is that if we had to unpack an object, it's very