diff --git a/0015_fixbug_fd_leak_for_init.patch b/0015_fixbug_fd_leak_for_init.patch new file mode 100644 index 0000000000000000000000000000000000000000..3bb9379678c9837975ebb97f7e4127aca381ea55 --- /dev/null +++ b/0015_fixbug_fd_leak_for_init.patch @@ -0,0 +1,12 @@ +diff --git a/services/param/linux/param_request.c b/services/param/linux/param_request.c +index 460486d..6bcd72d 100644 +--- a/services/param/linux/param_request.c ++++ b/services/param/linux/param_request.c +@@ -50,6 +50,7 @@ static int GetClientSocket() + serverAddr.sun_family = PF_UNIX; + strncpy(serverAddr.sun_path, PIPE_NAME, strlen(PIPE_NAME)); + if (connect(cfd, (struct sockaddr*)&serverAddr, sizeof(serverAddr)) < 0) { ++ close(cfd); + perror("Failed to connect"); + return -1; + } diff --git a/distributed-utils.spec b/distributed-utils.spec index 21f3b17754cf927670f64a3ac0490823ff1e33f1..3d29b8c96b6194c58ce2874008f3402d0219346f 100644 --- a/distributed-utils.spec +++ b/distributed-utils.spec @@ -23,7 +23,7 @@ Name: distributed-utils Version: 1.0.0 -Release: 5 +Release: 6 Summary: Distributed middleware used components. License: Apache-2.0 and MIT Url: https://gitee.com/openharmony/ @@ -60,6 +60,7 @@ Patch11: 0011-remove-dependency-and-adapt-for-build-device_manager.patch Patch12: 0012-remove-dependency-and-adapt-for-build-device_security_level.patch Patch13: 0013-increase-the-pthread-stack-size-of-x86-and-other-env-dsoftbus.patch Patch14: 0014-fixbug-metaDescriptor-for-ipc.patch +Patch15: 0015_fixbug_fd_leak_for_init.patch BuildRequires: python3-jinja2 python3-pyyaml cjson cjson-devel BuildRequires: libatomic libicu-devel libxml2-devel openssl-devel @@ -117,6 +118,7 @@ rm -rf %{_builddir}/third_party/mbedtls/* %patch12 -p1 -d %{device_security_level_dir} %patch13 -p1 -d %{dsoftbus_dir} %patch14 -p1 -d %{ipc_dir} +%patch15 -p1 -d %{init_dir} # build all components with build.sh %build @@ -215,6 +217,9 @@ cp -rvf single_include/nlohmann %{buildroot}/%{_includedir}/nlohmann_json/single /usr/bin/* %changelog +* Tue Nov 21 2023 yanansong - 1.0.0-6 +- fixbug fd leak for init module. + * Fri Oct 27 2023 yanansong - 1.0.0-5 - fixbug metaDescriptor initialization.