mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
module-access: Plug /.flatpak-info fd leak
The file descriptor needs to be closed in all situations, not only in the fstat error case.
This commit is contained in:
parent
3d82700edb
commit
ddd731bc09
1 changed files with 1 additions and 1 deletions
|
|
@ -144,9 +144,9 @@ static int check_flatpak(struct pw_impl_client *client, int pid)
|
||||||
}
|
}
|
||||||
if (fstat (info_fd, &stat_buf) != 0 || !S_ISREG (stat_buf.st_mode)) {
|
if (fstat (info_fd, &stat_buf) != 0 || !S_ISREG (stat_buf.st_mode)) {
|
||||||
/* Some weird fd => failure, assume sandboxed */
|
/* Some weird fd => failure, assume sandboxed */
|
||||||
close(info_fd);
|
|
||||||
pw_log_error("error fstat .flatpak-info: %m");
|
pw_log_error("error fstat .flatpak-info: %m");
|
||||||
}
|
}
|
||||||
|
close(info_fd);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue