[systemd-devel] [PATCH] tmpfiles: plug file descriptor leak.
Lennart Poettering
lennart at poettering.net
Wed Sep 12 15:07:24 PDT 2012
On Wed, 12.09.12 16:21, Dave Reisner (dreisner at archlinux.org) wrote:
> Introduced in d4e9eb91.
> ---
> Sorry Lennart, I should have pointed this out along with my nudging last night
> on IRC about the prior patch.
Applied! Thanks!
>
> src/tmpfiles/tmpfiles.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
> index 70de06b..ed51ec8 100644
> --- a/src/tmpfiles/tmpfiles.c
> +++ b/src/tmpfiles/tmpfiles.c
> @@ -528,6 +528,8 @@ static int write_one_file(Item *i, const char *path) {
> }
> }
>
> + close_nointr_nofail(fd);
> +
> if (stat(path, &st) < 0) {
> log_error("stat(%s) failed: %m", path);
> return -errno;
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list