You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pe...@apache.org on 2023/11/23 10:54:26 UTC

(celix) 06/08: [CID 331900]Fix data race in rsa_dfi.

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 0bf58e87035491d1fa08643284f31bececf753b1
Author: PengZheng <ho...@gmail.com>
AuthorDate: Thu Nov 23 18:39:20 2023 +0800

    [CID 331900]Fix data race in rsa_dfi.
---
 .../remote_service_admin_dfi/src/import_registration_dfi.c              | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bundles/remote_services/remote_service_admin_dfi/src/import_registration_dfi.c b/bundles/remote_services/remote_service_admin_dfi/src/import_registration_dfi.c
index a0488ed0..e1a39812 100644
--- a/bundles/remote_services/remote_service_admin_dfi/src/import_registration_dfi.c
+++ b/bundles/remote_services/remote_service_admin_dfi/src/import_registration_dfi.c
@@ -190,8 +190,8 @@ static void* importRegistration_getService(void *handle, const celix_bundle_t *r
 void importRegistration_ungetService(void *handle, const celix_bundle_t *requestingBundle, const celix_properties_t *svcProperties) {
     import_registration_t* import = handle;
     assert(import != NULL);
-    assert(import->proxies != NULL);
     pthread_mutex_lock(&import->proxiesMutex);
+    assert(import->proxies != NULL);
     struct service_proxy *proxy = hashMap_get(import->proxies, requestingBundle);
     if (proxy != NULL) {
         proxy->count -= 1;