代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libvirt 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 8a06893a603f32791899314fd16afdd424e77e6a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
Date: Fri, 3 Sep 2021 16:04:44 +0200
Subject: [PATCH 100/108] util: virIdentitySetCurrent: only unref the old
identity on success
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In the unlikely case that we were unable to set the new
identity, we would unref the old one even though it still
could be in the thread-local storage.
Fixes: c6825d88137cb8e4debdf4310e45ee23cb5698c0
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit a082c462290bfa8fd4cbbc41c1d6040864228c78)
---
src/util/viridentity.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/util/viridentity.c b/src/util/viridentity.c
index 2cb9042a84..e133d29e7d 100644
--- a/src/util/viridentity.c
+++ b/src/util/viridentity.c
@@ -122,7 +122,7 @@ virIdentityPtr virIdentityGetCurrent(void)
*/
int virIdentitySetCurrent(virIdentityPtr ident)
{
- g_autoptr(virIdentity) old = NULL;
+ virIdentity *old = NULL;
if (virIdentityInitialize() < 0)
return -1;
@@ -138,6 +138,8 @@ int virIdentitySetCurrent(virIdentityPtr ident)
return -1;
}
+ if (old)
+ g_object_unref(old);
return 0;
}
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。