mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-25 01:34:34 +03:00
lib/deploy: Don't leak fd when checksumming dtbs
Likely the root of https://bugzilla.redhat.com/show_bug.cgi?id=1886149.
This commit is contained in:
parent
84f8de6daa
commit
b3dc074f5e
@ -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, FALSE);
|
||||
g_autoptr(GInputStream) in = g_unix_input_stream_new (glnx_steal_fd (&fd), TRUE);
|
||||
if (!ot_gio_splice_update_checksum (NULL, in, checksum, cancellable, error))
|
||||
return FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user