[ostree] checkout: Fix file descriptor leak for copying checkouts



commit 0238a2c26c97ff865db4ce15c15e1015709533bf
Author: Colin Walters <walters verbum org>
Date:   Wed Sep 11 10:58:22 2013 -0400

    checkout: Fix file descriptor leak for copying checkouts
    
    Hardlink checkouts didn't hit this, but we need to close the input
    stream.

 src/libostree/ostree-repo-checkout.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/libostree/ostree-repo-checkout.c b/src/libostree/ostree-repo-checkout.c
index 2d6c514..437e309 100644
--- a/src/libostree/ostree-repo-checkout.c
+++ b/src/libostree/ostree-repo-checkout.c
@@ -502,6 +502,9 @@ checkout_one_file_at (OstreeRepo                        *repo,
               goto out;
             }
         }
+
+      if (!g_input_stream_close (input, cancellable, error))
+        goto out;
     }
 
   ret = TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]