1 Star 0 Fork 46

DriedYellowPeach/iSulad_1

forked from src-openEuler/iSulad 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0021-unlock-m_podsLock-if-new-failed.patch 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
From f6243bb672bca8fd2e32752480aa92dc8f97adc9 Mon Sep 17 00:00:00 2001
From: zhangxiaoyu <[email protected]>
Date: Wed, 22 Feb 2023 10:43:52 +0800
Subject: [PATCH 21/53] unlock m_podsLock if new failed
Signed-off-by: zhangxiaoyu <[email protected]>
---
src/daemon/entry/cri/network_plugin.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/daemon/entry/cri/network_plugin.cc b/src/daemon/entry/cri/network_plugin.cc
index f6a155c3..4a119d6b 100644
--- a/src/daemon/entry/cri/network_plugin.cc
+++ b/src/daemon/entry/cri/network_plugin.cc
@@ -345,6 +345,9 @@ void PluginManager::Lock(const std::string &fullPodName, Errors &error)
auto tmpLock = std::unique_ptr<PodLock>(new (std::nothrow) PodLock());
if (tmpLock == nullptr) {
error.SetError("Out of memory");
+ if (pthread_mutex_unlock(&m_podsLock) != 0) {
+ error.SetError("plugin manager unlock failed");
+ }
return;
}
lock = tmpLock.get();
--
2.25.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/driedyellowpeach/iSulad_1.git
[email protected]:driedyellowpeach/iSulad_1.git
driedyellowpeach
iSulad_1
iSulad_1
master

搜索帮助