From e78f46fb383be5edd88c2912187c1789ae7ad8c8 Mon Sep 17 00:00:00 2001 From: Tvisha Andharia Date: Mon, 2 Dec 2024 08:09:47 -0500 Subject: [PATCH] Fix #2615, Unloading module after failed app start --- modules/es/fsw/src/cfe_es_apps.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/es/fsw/src/cfe_es_apps.c b/modules/es/fsw/src/cfe_es_apps.c index f4f2101ff..91be157b8 100644 --- a/modules/es/fsw/src/cfe_es_apps.c +++ b/modules/es/fsw/src/cfe_es_apps.c @@ -799,6 +799,10 @@ int32 CFE_ES_AppCreate(CFE_ES_AppId_t *ApplicationIdPtr, const char *AppName, co /* * Set the table entry back to free */ + if (OS_ObjectIdDefined(AppRecPtr->LoadStatus.ModuleId)) { + OS_ModuleUnload(AppRecPtr->LoadStatus.ModuleId); + } + CFE_ES_AppRecordSetFree(AppRecPtr); PendingResourceId = CFE_RESOURCEID_UNDEFINED; }