[ostree] sysroot: Close sysroot fd in finalize



commit f08cb802ea1b02c874fd71a0672c28b49e890d49
Author: Colin Walters <walters verbum org>
Date:   Sun Apr 19 15:25:05 2015 -0400

    sysroot: Close sysroot fd in finalize
    
    Just noticed this while I was going to add another one there.

 src/libostree/ostree-sysroot.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c
index b18c6b7..6255803 100644
--- a/src/libostree/ostree-sysroot.c
+++ b/src/libostree/ostree-sysroot.c
@@ -66,6 +66,9 @@ ostree_sysroot_finalize (GObject *object)
   g_clear_object (&self->sepolicy);
   g_clear_object (&self->repo);
 
+  if (self->sysroot_fd != -1)
+    (void) close (self->sysroot_fd);
+
   G_OBJECT_CLASS (ostree_sysroot_parent_class)->finalize (object);
 }
 


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