-
Notifications
You must be signed in to change notification settings - Fork 52
RDKEMW-12282: Fix Coverity identified issues - dobby #405
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
base: main
Are you sure you want to change the base?
Changes from 4 commits
9dc285d
bb782fd
8ba7846
9388819
f75dfe6
9756bc7
1a532ab
161d7b0
7832785
60aac7c
06a0de3
f6adb02
b39b464
c1c6dbd
2730884
e0d2038
ad315d1
a495ad9
f5138f9
b7d7f2f
03f92fe
9756d4a
dc87f41
2077a4e
572c7b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -195,7 +195,6 @@ class Notifier : virtual public Polymorphic | |
| { | ||
| cv.notify_all(); | ||
| } | ||
| lock.unlock(); | ||
| } | ||
|
|
||
| protected: | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -164,11 +164,13 @@ bool DobbyBundleConfig::isValid() const | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| uid_t DobbyBundleConfig::userId() const | ||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||
| std::lock_guard<std::mutex> locker(mLock); | ||||||||||||||||||||||||||||
| return mUserId; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| gid_t DobbyBundleConfig::groupId() const | ||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||
| std::lock_guard<std::mutex> locker(mLock); | ||||||||||||||||||||||||||||
| return mGroupId; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
@@ -244,6 +246,7 @@ const std::string& DobbyBundleConfig::rootfsPath() const | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| bool DobbyBundleConfig::restartOnCrash() const | ||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||
| std::lock_guard<std::mutex> locker(mLock); | ||||||||||||||||||||||||||||
| return mRestartOnCrash; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
@@ -286,6 +289,7 @@ const std::map<std::string, Json::Value>& DobbyBundleConfig::legacyPlugins() con | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| const std::map<std::string, Json::Value>& DobbyBundleConfig::rdkPlugins() const | ||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||
| std::lock_guard<std::mutex> locker(mLock); | ||||||||||||||||||||||||||||
| return mRdkPlugins; | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
| std::lock_guard<std::mutex> locker(mLock); | |
| return mRdkPlugins; | |
| // Create a thread-local copy of the plugin map so that callers | |
| // receive a reference to per-thread data that is not modified | |
| // concurrently by other threads. | |
| thread_local std::map<std::string, Json::Value> rdkPluginsCopy; | |
| { | |
| std::lock_guard<std::mutex> locker(mLock); | |
| rdkPluginsCopy = mRdkPlugins; | |
| } | |
| return rdkPluginsCopy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timer::~Timer() catches std::exception but ignores it (empty catch block), which can hide real failures during destruction. Either remove the try/catch (cancel() doesn't appear to throw here) or at least log the exception so failures aren't silently swallowed.