Skip to content

Commit

Permalink
Coverity 11892: in class Stop, address lock-free access to stop_calle…
Browse files Browse the repository at this point in the history
…d member

In class Stop, the stop_called member is safe to read
without locking, but make it volatile to document this.

Signed-off-by: James Yonan <james@openvpn.net>
  • Loading branch information
jamesyonan committed Nov 24, 2023
1 parent ecdf041 commit a93d711
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openvpn/common/stop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class Stop

std::recursive_mutex mutex;
std::vector<Scope *> scopes;
bool stop_called = false;
volatile bool stop_called = false;
};

} // namespace openvpn
Expand Down

0 comments on commit a93d711

Please sign in to comment.