Skip to content

Commit

Permalink
HPCC-32768 Ensure setActivity() destroys activities outside the criti…
Browse files Browse the repository at this point in the history
…cal section

Signed-off-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday committed Oct 2, 2024
1 parent 50ed84f commit 8fd7d13
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions roxie/ccd/ccdqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1409,8 +1409,12 @@ class CRoxieWorker : public CInterface, implements IPooledThread
}
inline void setActivity(IRoxieAgentActivity *act)
{
CriticalBlock b(actCrit);
activity.setown(act);
//Ensure that the activity is released outside of the critical section
Owned<IRoxieAgentActivity> temp(act);
{
CriticalBlock b(actCrit);
activity.swap(temp);
}
}
inline bool match(RoxiePacketHeader &h)
{
Expand Down

0 comments on commit 8fd7d13

Please sign in to comment.