You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by bp...@apache.org on 2015/10/13 18:26:07 UTC
celix git commit: CELIX-272: fixed illegal access/uninitialized values
Repository: celix
Updated Branches:
refs/heads/develop 7c6a1410a -> 38931fd37
CELIX-272: fixed illegal access/uninitialized values
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/38931fd3
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/38931fd3
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/38931fd3
Branch: refs/heads/develop
Commit: 38931fd374c74ad2ce61ebcb70cff53275cf0076
Parents: 7c6a141
Author: Bjoern Petri <bp...@apache.org>
Authored: Tue Oct 13 18:24:52 2015 +0200
Committer: Bjoern Petri <bp...@apache.org>
Committed: Tue Oct 13 18:24:52 2015 +0200
----------------------------------------------------------------------
framework/private/src/bundle_cache.c | 5 +++--
framework/private/src/framework.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/38931fd3/framework/private/src/bundle_cache.c
----------------------------------------------------------------------
diff --git a/framework/private/src/bundle_cache.c b/framework/private/src/bundle_cache.c
index c4b3bd6..81bc96e 100644
--- a/framework/private/src/bundle_cache.c
+++ b/framework/private/src/bundle_cache.c
@@ -41,7 +41,7 @@ celix_status_t bundleCache_create(properties_pt configurationMap, framework_logg
celix_status_t status;
bundle_cache_pt cache;
- cache = (bundle_cache_pt) malloc((sizeof(*cache)));
+ cache = (bundle_cache_pt) calloc((1, sizeof(*cache)));
if (cache == NULL) {
status = CELIX_ENOMEM;
} else {
@@ -59,9 +59,10 @@ celix_status_t bundleCache_create(properties_pt configurationMap, framework_logg
} else {
status = CELIX_ILLEGAL_ARGUMENT;
}
+
+ framework_logIfError(cache->logger, status, NULL, "Failed to create bundle cache");
}
- framework_logIfError(cache->logger, status, NULL, "Failed to create bundle cache");
return status;
}
http://git-wip-us.apache.org/repos/asf/celix/blob/38931fd3/framework/private/src/framework.c
----------------------------------------------------------------------
diff --git a/framework/private/src/framework.c b/framework/private/src/framework.c
index f2cfb4a..7cfb9f1 100644
--- a/framework/private/src/framework.c
+++ b/framework/private/src/framework.c
@@ -2392,7 +2392,7 @@ static celix_status_t frameworkActivator_destroy(void * userData, bundle_context
static celix_status_t framework_loadBundleLibraries(framework_pt framework, bundle_pt bundle) {
celix_status_t status = CELIX_SUCCESS;
- handle_t handle;
+ handle_t handle = NULL;
bundle_archive_pt archive = NULL;
bundle_revision_pt revision = NULL;
manifest_pt manifest = NULL;