ostree_sysroot.c: Don't close sysroot_fd twice.
If ostree_sysroot_unload() was called explicitly, then sysroot_fd would be closed again at finalization time, possibly closing a random file descriptor belonging to some other part of the application. Closes: #507 Approved by: cgwalters
This commit is contained in:
1 parent
a5af1cb688
commit
a8301b909c
1 file changed
+3
@@ -260,7 +260,10 @@ void
|
|||||||
ostree_sysroot_unload (OstreeSysroot *self)
|
ostree_sysroot_unload (OstreeSysroot *self)
|
||||||
{
|
{
|
||||||
if (self->sysroot_fd != -1)
|
if (self->sysroot_fd != -1)
|
||||||
|
{
|
||||||
(void) close (self->sysroot_fd);
|
(void) close (self->sysroot_fd);
|
||||||
|
self->sysroot_fd = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in new issue
Block a user