代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/glibc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 66c23fa97a1bf8819051f1c358ae5eb38eeefae2 Mon Sep 17 00:00:00 2001
From: huangyu <huangyu106@huawei.com>
Date: Tue, 6 Sep 2022 11:55:40 +0800
Subject: [PATCH] huawei-fix_nss_database_check_reload_and_get_memleak.patch
The return nss_database_check_reload_adn_get (local, actions, db) does not check
whether the local value is empty before invoking the local interface.
Signed-off-by: huangyu <huangyu106@huawei.com>
---
nss/nss_database.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/nss/nss_database.c b/nss/nss_database.c
index 54561f03..a503890a 100644
--- a/nss/nss_database.c
+++ b/nss/nss_database.c
@@ -254,6 +254,8 @@ __nss_configure_lookup (const char *dbname, const char *service_line)
__nss_database_get (db, &result);
local = nss_database_state_get ();
+ if (local == NULL)
+ return -1;
result = __nss_action_parse (service_line);
if (result == NULL)
@@ -399,6 +401,9 @@ nss_database_check_reload_and_get (struct nss_database_state *local,
/* Acquire MO is needed because the thread that sets reload_disabled
may have loaded the configuration first, so synchronize with the
Release MO store there. */
+ if (local == NULL)
+ return false;
+
if (atomic_load_acquire (&local->data.reload_disabled))
{
*result = local->data.services[database_index];
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。