From 8544e59a711fb3bb97d766b52821d807cb2c26fb Mon Sep 17 00:00:00 2001 From: Eran Date: Mon, 16 Sep 2024 09:26:01 +0300 Subject: [PATCH] fix additional coverity in signal.h --- third-party/rsutils/include/rsutils/signal.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/third-party/rsutils/include/rsutils/signal.h b/third-party/rsutils/include/rsutils/signal.h index 7d2bfb717a..bf799c9068 100644 --- a/third-party/rsutils/include/rsutils/signal.h +++ b/third-party/rsutils/include/rsutils/signal.h @@ -112,7 +112,11 @@ class signal } // How many subscriptions are active - size_t size() const { return _impl->subscribers.size(); } + size_t size() const + { + std::lock_guard< std::mutex > locker( _impl->mutex ); + return _impl->subscribers.size(); + } };