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

Minor coverity fixes #315

Merged
merged 2 commits into from
Nov 28, 2023
Merged

Minor coverity fixes #315

merged 2 commits into from
Nov 28, 2023

Conversation

simo5
Copy link
Member

@simo5 simo5 commented Nov 28, 2023

These are locking related.
There wasn't anything really wrong in the code, because of external guarantees, and some actions were intentional.
However Coverity rightfully complains as from a strict pov the code was not always properly following a consistent use of locking.

This may call for followup PRs to make Coverity happy if this first round is not sufficient.

OpenSSL is in charge of making sure the context is not used when it
is freed.
Repurpose the lock to only cover parts of the context that can be
changed by independent threads after the context creation.

Fixes:
 CID 468683
 CID 468679

Signed-off-by: Simo Sorce <[email protected]>
We will always pay the price of a lock, but this is the more robust
thing to do for now.

Fixes:
 CID 468681
 CID 468678

Signed-off-by: Simo Sorce <[email protected]>
@simo5 simo5 merged commit b4728fa into latchset:main Nov 28, 2023
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant