projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84f8de6
)
lib/deploy: Don't leak fd when checksumming dtbs
author
Jonathan Lebon
<jonathan@jlebon.com>
Wed, 7 Oct 2020 18:44:25 +0000
(14:44 -0400)
committer
Jonathan Lebon
<jonathan@jlebon.com>
Wed, 7 Oct 2020 18:47:34 +0000
(14:47 -0400)
Likely the root of https://bugzilla.redhat.com/show_bug.cgi?id=
1886149
.
src/libostree/ostree-sysroot-deploy.c
patch
|
blob
|
history
diff --git
a/src/libostree/ostree-sysroot-deploy.c
b/src/libostree/ostree-sysroot-deploy.c
index 1c4fb5dc8b964e74837c26aeea57605249c941de..7b7ba5e92fad8d987c046ca73f3ed20f34ee2edd 100644
(file)
--- a/
src/libostree/ostree-sysroot-deploy.c
+++ b/
src/libostree/ostree-sysroot-deploy.c
@@
-272,13
+272,13
@@
checksum_dir_recurse (int dfd,
}
else
{
-
int fd
;
+
glnx_autofd int fd = -1
;
if (!ot_openat_ignore_enoent (dfditer.fd, d_name, &fd, error))
return FALSE;
if (fd != -1)
{
- g_autoptr(GInputStream) in = g_unix_input_stream_new (
fd, FALS
E);
+ g_autoptr(GInputStream) in = g_unix_input_stream_new (
glnx_steal_fd (&fd), TRU
E);
if (!ot_gio_splice_update_checksum (NULL, in, checksum, cancellable, error))
return FALSE;
}