celix icon indicating copy to clipboard operation
celix copied to clipboard

Missing function call

Open PengZheng opened this issue 5 years ago • 1 comments

https://github.com/apache/celix/blob/master/libs/framework/src/framework.c#L770-L771

            status = CELIX_BUNDLE_EXCEPTION;
            status = CELIX_DO_IF(status, bundleArchive_closeAndDelete(archive));

bundleArchive_closeAndDelete will never been called. Is it intentional or is it a bug?

PengZheng avatar Nov 30 '20 13:11 PengZheng

Looks like a bug to me. But the solution isn't clear to me yet. Closing/deleting the archive which has been passed to fw_installBundle2 sounds like a possible unwanted side-effect. Line 488 for example, passes an archive from an array list. I'd imagine that if the returned status of fw_installBundle2 is CELIX_BUNDLE_EXCEPTION, the entry in the array list should be removed as well. And that's just one of the uses of fw_installBundle2.

Oipo avatar Dec 03 '20 10:12 Oipo