From: Adam Dickmeiss Date: Wed, 19 Mar 2014 16:48:57 +0000 (+0100) Subject: frontend_net: fix segfault on startup MP-524 X-Git-Tag: v1.4.6~4 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=ffe725e290246877e53874354229cd340a02de8e;p=metaproxy-moved-to-github.git 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). --- 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);