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

pengzheng pushed a commit to branch hotfix/coverity_fix
in repository https://gitbox.apache.org/repos/asf/celix.git

commit e531b1a60ee8b29e58fca0aa3433c215b61fb648
Author: PengZheng <[email protected]>
AuthorDate: Mon Apr 10 14:59:51 2023 +0800

    Fix Coverity 16318: explicit null dereferenced.
---
 libs/framework/src/service_reference.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libs/framework/src/service_reference.c 
b/libs/framework/src/service_reference.c
index 18302351..fbb02081 100644
--- a/libs/framework/src/service_reference.c
+++ b/libs/framework/src/service_reference.c
@@ -199,7 +199,8 @@ FRAMEWORK_EXPORT celix_status_t 
serviceReference_getPropertyKeys(service_referen
     celix_status_t status = CELIX_SUCCESS;
     properties_pt props = NULL;
 
-    serviceRegistration_getProperties(ref->registration, &props);
+    status = serviceRegistration_getProperties(ref->registration, &props);
+    assert(status == CELIX_SUCCESS);
     hash_map_iterator_pt it;
     int i = 0;
     int vsize = hashMap_size(props);

Reply via email to