Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #121, Add check for UsedFlag and sets APID to CFE_TBL_NOT_OWNED #622

Merged
merged 1 commit into from
Apr 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion fsw/cfe-core/src/tbl/cfe_tbl_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ int32 CFE_TBL_CleanUpApp(uint32 AppId)
for (i=0; i<CFE_PLATFORM_TBL_MAX_NUM_HANDLES; i++)
{
/* Check to see if the Handle belongs to the Application being deleted */
if (CFE_TBL_TaskData.Handles[i].AppId == AppId)
if (CFE_TBL_TaskData.Handles[i].AppId == AppId && CFE_TBL_TaskData.Handles[i].UsedFlag == TRUE)
{
/* Delete the handle (and the table, if the App owned it) */
/* Get a pointer to the relevant Access Descriptor */
Expand All @@ -1418,6 +1418,9 @@ int32 CFE_TBL_CleanUpApp(uint32 AppId)
/* NOTE: If this removes the last access link, then */
/* memory buffers are set free as well. */
CFE_TBL_RemoveAccessLink(i);

CFE_TBL_TaskData.Handles[i].AppId = (uint32)CFE_TBL_NOT_OWNED;

}
}

Expand Down