From ffe725e290246877e53874354229cd340a02de8e Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 19 Mar 2014 17:48:57 +0100 Subject: [PATCH] frontend_net: fix segfault on startup MP-524 Would happen if MP was listening on multiple ports and one of the ports was already in use (and MP would exit). --- src/filter_frontend_net.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/filter_frontend_net.cpp b/src/filter_frontend_net.cpp index 6c70880..c744a66 100644 --- a/src/filter_frontend_net.cpp +++ b/src/filter_frontend_net.cpp @@ -727,7 +727,9 @@ void yf::FrontendNet::set_ports(std::vector &ports) // Create yf::FrontendNet::ZAssocServer for each port size_t i; - for (i = 0; im_ports.size(); i++) + for (i = 0; i < m_p->m_ports.size(); i++) + m_p->az[i] = 0; + for (i = 0; i < m_p->m_ports.size(); i++) { // create a PDU assoc object (one per yf::FrontendNet::ZAssocServer) yazpp_1::PDU_Assoc *as = new yazpp_1::PDU_Assoc(&m_p->mySocketManager); -- 1.7.10.4