This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch feature/coverity-fixes
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 902038aea4bdb0ca57ab16c1e943c3e17a8325ca
Author: PengZheng <[email protected]>
AuthorDate: Thu Nov 23 15:04:28 2023 +0800

    [CID 331872]Remove unnecessary locking.
---
 libs/framework/src/framework.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libs/framework/src/framework.c b/libs/framework/src/framework.c
index 21df340b..2cfdf979 100644
--- a/libs/framework/src/framework.c
+++ b/libs/framework/src/framework.c
@@ -297,7 +297,6 @@ celix_status_t framework_destroy(framework_pt framework) {
 
     celix_serviceRegistry_destroy(framework->registry);
 
-    celixThreadMutex_lock(&framework->installedBundles.mutex);
     for (int i = 0; i < 
celix_arrayList_size(framework->installedBundles.entries); ++i) {
         celix_framework_bundle_entry_t *entry = 
celix_arrayList_get(framework->installedBundles.entries, i);
         celixThreadMutex_lock(&entry->useMutex);
@@ -336,7 +335,6 @@ celix_status_t framework_destroy(framework_pt framework) {
         bundle_destroy(bnd);
 
     }
-    celixThreadMutex_unlock(&framework->installedBundles.mutex);
     celix_arrayList_destroy(framework->installedBundles.entries);
     celixThreadMutex_destroy(&framework->installedBundles.mutex);
     celixThreadMutex_destroy(&framework->installLock);

Reply via email to