Skip to content

Commit

Permalink
Fix a potential memory leak.
Browse files Browse the repository at this point in the history
  • Loading branch information
PengZheng committed Aug 3, 2023
1 parent 6c86749 commit 9a0709b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libs/framework/src/bundle_archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static celix_status_t celix_bundleArchive_removeResourceCache(bundle_archive_t*
fw_logCode(archive->fw->logger, CELIX_LOG_LEVEL_ERROR, status, "Failed to stat bundle archive directory '%s'", archive->resourceCacheRoot);
return status;
}
// assert(status == 0);
assert(status == 0);
// celix_utils_deleteDirectory does not work for dangling symlinks, so handle this case separately
if (S_ISLNK(st.st_mode)) {
status = unlink(archive->resourceCacheRoot);
Expand Down
1 change: 1 addition & 0 deletions libs/framework/src/celix_bundle_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ static void celix_bundleCache_updateIdForLocationLookupMap(celix_bundle_cache_t*
}
celix_properties_destroy(props);
}
celix_utils_freeStringIfNotEqual(archiveRootBuffer, bundleStateProperties);
}
closedir(dir);
}
Expand Down

0 comments on commit 9a0709b

Please sign in to comment.