lib:util: File descriptor being closed repeatedly.
commitf4556250b87cd166c7516b7ebe28e2a6ca09eb7f
authorbaixiangcpp <baixiangcpp@gmail.com>
Fri, 10 Feb 2023 03:01:47 +0000 (10 11:01 +0800)
committerJule Anger <janger@samba.org>
Thu, 23 Feb 2023 13:37:27 +0000 (23 13:37 +0000)
treef0828d7f2a5955a61a5cdb2243f9f4f92c9b9f77
parent0b8713e342c6b7eb58e19fc01c90a7182d843baf
lib:util: File descriptor being closed repeatedly.

In file_load()/file_lines_load(), the file's fd is obtained using
open(), and in fd_load() the fd is converted to a FILE* using
fdopen(). However, after fclose(), the fd is closed again using
close().

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15311
Signed-off-by: baixiangcpp baixiangcpp@gmail.com
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Feb 16 12:13:05 UTC 2023 on atb-devel-224

(cherry picked from commit 206dcf7d426e9e85c896c54839008e194d9a2824)

Autobuild-User(v4-17-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-17-test): Thu Feb 23 13:37:27 UTC 2023 on sn-devel-184
lib/util/util_file.c