Skip to content

Commit 97ea09a

Browse files
RDKEMW-10556 : Fix the static code analysis issues
Reason for Change: static issues comments Test Procedure: Compiled and Verified Risks: Low Priority: P1 Signed-off-by: HarshiniRavichandran <[email protected]>
1 parent a6e949e commit 97ea09a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Packager/PackagerImplementation.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,12 @@ namespace Plugin {
151151
// Correct order: save value, erase iterator, use saved value.
152152
auto* notificationPtr = *item;
153153
_notifications.erase(item);
154-
notificationPtr->Release();
155-
156154
_adminLock.Unlock();
155+
156+
// FIX: Call Release() AFTER unlocking to prevent "pure virtual method called" error.
157+
// Release() may trigger destructor which could call virtual methods or re-enter code.
158+
// Calling it while holding lock can cause deadlock or pure virtual calls during destruction.
159+
notificationPtr->Release();
157160
}
158161

159162
uint32_t PackagerImplementation::Install(const string& name, const string& version, const string& arch)

0 commit comments

Comments
 (0)