celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [1/2] celix git commit: CELIX-364: Fixes bug with incorrect destroy function
Date Sun, 26 Jun 2016 07:55:44 GMT
Repository: celix
Updated Branches:
  refs/heads/develop 6de29e9c5 -> 8c4e037db


CELIX-364: Fixes bug with incorrect destroy function


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/13d5d97b
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/13d5d97b
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/13d5d97b

Branch: refs/heads/develop
Commit: 13d5d97ba003444e3d3a41a247bcf45487d04055
Parents: 6de29e9
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Sun Jun 26 09:54:05 2016 +0200
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Sun Jun 26 09:54:05 2016 +0200

----------------------------------------------------------------------
 .../private/src/dm_dependency_manager_impl.c         | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/13d5d97b/dependency_manager/private/src/dm_dependency_manager_impl.c
----------------------------------------------------------------------
diff --git a/dependency_manager/private/src/dm_dependency_manager_impl.c b/dependency_manager/private/src/dm_dependency_manager_impl.c
index 3e67f8c..2da30e5 100644
--- a/dependency_manager/private/src/dm_dependency_manager_impl.c
+++ b/dependency_manager/private/src/dm_dependency_manager_impl.c
@@ -119,14 +119,11 @@ celix_status_t dependencyManager_getInfo(dm_dependency_manager_pt manager,
dm_de
 }
 
 void dependencyManager_destroyInfo(dm_dependency_manager_pt manager, dm_dependency_manager_info_pt
info) {
-
-	unsigned int i = 0;
-	for(;i<arrayList_size(info->components);i++){
-		dm_component_info_pt cmpinfo = (dm_component_info_pt)arrayList_get(info->components,0);
-		component_destroyComponentInfo(cmpinfo);
-        }
-        arrayList_destroy(info->components);
-
+    unsigned int i = 0;
+    for (; i < arrayList_size(info->components); i += 1) {
+        dm_component_info_pt cmpinfo = (dm_component_info_pt)arrayList_get(info->components,
i);
+        component_destroyComponentInfo(cmpinfo);
+    }
+    arrayList_destroy(info->components);
     free(info);
-
 }


Mime
View raw message