From 2a0cd00958c57877e8b68dc5639e3b4e22560bca Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Mon, 27 Feb 2017 14:48:30 -0500 Subject: [PATCH] libca: lock when removing from msgMultiPVList --- src/ca/cac.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ca/cac.cpp b/src/ca/cac.cpp index 3c19e09b9..c7488d76f 100644 --- a/src/ca/cac.cpp +++ b/src/ca/cac.cpp @@ -1306,9 +1306,11 @@ void cac::pvMultiplyDefinedNotify ( msgForMultiplyDefinedPV & mfmdpv, callbackManager mgr ( this->notify, this->cbMutex ); epicsGuard < epicsMutex > guard ( this->mutex ); this->exception ( mgr.cbGuard, guard, ECA_DBLCHNL, buf, __FILE__, __LINE__ ); + + // remove from the list under lock + this->msgMultiPVList.remove ( mfmdpv ); } - // remove from the list and delete msg object - this->msgMultiPVList.remove ( mfmdpv ); + // delete msg object mfmdpv.~msgForMultiplyDefinedPV (); this->mdpvFreeList.release ( & mfmdpv ); }