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

Reduce scope of lock to within if statement in CFE_SB_ReleaseMessageBuffer #1461

Open
skliper opened this issue Apr 29, 2021 · 0 comments · May be fixed by #2198
Open

Reduce scope of lock to within if statement in CFE_SB_ReleaseMessageBuffer #1461

skliper opened this issue Apr 29, 2021 · 0 comments · May be fixed by #2198

Comments

@skliper
Copy link
Contributor

skliper commented Apr 29, 2021

Is your feature request related to a problem? Please describe.
Locks outside if:

CFE_SB_LockSharedData(__func__, __LINE__);
if (Status == CFE_SUCCESS)
{
/* Clear the ownership app ID and decrement use count (may also free) */
BufDscPtr->AppId = CFE_ES_APPID_UNDEFINED;
CFE_SB_DecrBufUseCnt(BufDscPtr);
}
CFE_SB_UnlockSharedData(__func__, __LINE__);

Describe the solution you'd like
Move inside

Describe alternatives you've considered
None

Additional context
Code review

Requester Info
Jacob Hageman - NASA/GSFC

thnkslprpt added a commit to thnkslprpt/cFE that referenced this issue Nov 8, 2022
@thnkslprpt thnkslprpt linked a pull request Nov 8, 2022 that will close this issue
2 tasks
thnkslprpt added a commit to thnkslprpt/cFE that referenced this issue Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant