[ostree] checkout: Fix leak when doing uncompressed cache + copying checkouts
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] checkout: Fix leak when doing uncompressed cache + copying checkouts
- Date: Fri, 13 Sep 2013 21:15:40 +0000 (UTC)
commit d302c3d7ff60fb8bb6cdbb265fd6cb6d0eeadd09
Author: Colin Walters <walters verbum org>
Date: Fri Sep 13 17:14:35 2013 -0400
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.
src/libostree/ostree-repo-checkout.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/libostree/ostree-repo-checkout.c b/src/libostree/ostree-repo-checkout.c
index 13add04..f91b1c1 100644
--- a/src/libostree/ostree-repo-checkout.c
+++ b/src/libostree/ostree-repo-checkout.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]