summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-09-26 19:12:58 +0000
committernw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-09-26 19:12:58 +0000
commitdcf2266e87b2af988c9778852ab10fe42551614a (patch)
treeb1c8c5ff14b86f1868f77ce70994434e19b19ceb
parent0562922406c87a4934086d76145a45142c25018d (diff)
downloadATCD-dcf2266e87b2af988c9778852ab10fe42551614a.tar.gz
ACE_Log_Msg_Manager::close (): Must check if ACE_Log_Msg_message_queue has been open or not
before calling ACE_Log_Msg_message_queue->close () otherwise we'll get SIGSEGV when closing an invalid handle.
-rw-r--r--ace/Log_Msg.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp
index 8c2e5cc05ef..f8efa433f3b 100644
--- a/ace/Log_Msg.cpp
+++ b/ace/Log_Msg.cpp
@@ -132,7 +132,8 @@ ACE_Log_Msg_Manager::close (void)
ACE_Log_Msg_Manager::lock_ = 0;
// Destroy the static message queue instance.
- ACE_Log_Msg_message_queue->close ();
+ if (ACE_Log_Msg_message_queue->get_handle () != ACE_INVALID_HANDLE)
+ ACE_Log_Msg_message_queue->close ();
delete ACE_Log_Msg_message_queue;
ACE_Log_Msg_message_queue = 0;
}