Skip to content

Commit

Permalink
Fix nasa#1461, Move data lock to inside of if block
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Apr 19, 2024
1 parent 28a5820 commit 544872a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/sb/fsw/src/cfe_sb_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -2103,16 +2103,16 @@ CFE_Status_t CFE_SB_ReleaseMessageBuffer(CFE_SB_Buffer_t *BufPtr)

Status = CFE_SB_ZeroCopyBufferValidate(BufPtr, &BufDscPtr);

CFE_SB_LockSharedData(__func__, __LINE__);

if (Status == CFE_SUCCESS)
{
CFE_SB_LockSharedData(__func__, __LINE__);

/* 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__);
CFE_SB_UnlockSharedData(__func__, __LINE__);
}

return Status;
}
Expand Down

0 comments on commit 544872a

Please sign in to comment.