From a371dc4a41245664a4d923e141958ab323181c97 Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Tue, 4 Feb 2020 12:50:51 +0100 Subject: [PATCH] Refs #7530. Protect add_participant_proxy_data on initPDP. --- src/cpp/rtps/builtin/discovery/participant/PDP.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cpp/rtps/builtin/discovery/participant/PDP.cpp b/src/cpp/rtps/builtin/discovery/participant/PDP.cpp index ba3a3c40b49..df11e9fbc2f 100644 --- a/src/cpp/rtps/builtin/discovery/participant/PDP.cpp +++ b/src/cpp/rtps/builtin/discovery/participant/PDP.cpp @@ -313,7 +313,11 @@ bool PDP::initPDP( } //UPDATE METATRAFFIC. mp_builtin->updateMetatrafficLocators(this->mp_PDPReader->getAttributes().unicastLocatorList); + + mp_mutex->lock(); ParticipantProxyData* pdata = add_participant_proxy_data(part->getGuid(), true); + mp_mutex->unlock(); + if (pdata == nullptr) { return false;