Hi Alex,

Ack, for this part.


Please add information in the commit message(s) about what's fixed. Just to say 
that a crash is fixed is not enough. There should be some info about what is 
crashing and how the fix is fixing it. This is applicable for the other parts 
as well, at least if the fix affects the code in a significant way.


Thanks

Lennart


________________________________
Från: Jones, Alex <ajo...@rbbn.com>
Skickat: den 17 januari 2019 20:27
Till: Hans Nordebäck; Lennart Lund; Anders Widell; Vu Minh Nguyen
Kopia: opensaf-devel@lists.sourceforge.net; Jones, Alex
Ämne: [PATCH 5/5] logd: fix crash in logd [#2999]

---
src/log/logd/lgs_dest.cc | 2 +-
src/log/logd/lgs_unixsock_dest.cc | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/log/logd/lgs_dest.cc b/src/log/logd/lgs_dest.cc
index 0bd1fd3b0..0e70ddd12 100644
--- a/src/log/logd/lgs_dest.cc
+++ b/src/log/logd/lgs_dest.cc
@@ -114,7 +114,7 @@ void DestinationHandler::UpdateDestTypeDb(

case MsgType::kNoDest: {
TRACE("%s kNoDest", __func__);
- for (auto& it : nametype_map_) nametype_map_.erase(it.first);
+ nametype_map_.clear();
break;
}

diff --git a/src/log/logd/lgs_unixsock_dest.cc 
b/src/log/logd/lgs_unixsock_dest.cc
index 35ef43175..a48250063 100644
--- a/src/log/logd/lgs_unixsock_dest.cc
+++ b/src/log/logd/lgs_unixsock_dest.cc
@@ -329,10 +329,9 @@ ErrCode UnixSocketType::ProcessMsg(const 
DestinationHandler::HandleMsg& msg) {
return ErrCode::kDrop;
}

- for (auto& it : name_sockethdlr_map_) {
+ for (auto& it : name_sockethdlr_map_)
if (it.second != nullptr) delete it.second;
- name_sockethdlr_map_.erase(it.first);
- }
+ name_sockethdlr_map_.clear();
cfgsent = false;
break;
}
--
2.17.2


________________________________
Notice: This e-mail together with any attachments may contain information of 
Ribbon Communications Inc. that is confidential and/or proprietary for the sole 
use of the intended recipient. Any review, disclosure, reliance or distribution 
by others or forwarding without express permission is strictly prohibited. If 
you are not the intended recipient, please notify the sender immediately and 
then delete all copies, including any attachments.
________________________________

_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to