summaryrefslogtreecommitdiff
path: root/0021-unlock-m_podsLock-if-new-failed.patch
diff options
context:
space:
mode:
Diffstat (limited to '0021-unlock-m_podsLock-if-new-failed.patch')
-rw-r--r--0021-unlock-m_podsLock-if-new-failed.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/0021-unlock-m_podsLock-if-new-failed.patch b/0021-unlock-m_podsLock-if-new-failed.patch
new file mode 100644
index 0000000..c0dc084
--- /dev/null
+++ b/0021-unlock-m_podsLock-if-new-failed.patch
@@ -0,0 +1,27 @@
+From f6243bb672bca8fd2e32752480aa92dc8f97adc9 Mon Sep 17 00:00:00 2001
+From: zhangxiaoyu <zhangxiaoyu58@huawei.com>
+Date: Wed, 22 Feb 2023 10:43:52 +0800
+Subject: [PATCH 21/53] unlock m_podsLock if new failed
+
+Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
+---
+ 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
+