From: Adam Dickmeiss Date: Thu, 3 Oct 2013 09:25:42 +0000 (+0200) Subject: Fix SEGV when reaching max-clients YPRX-20 X-Git-Tag: v1.3.9~2 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=16dbedf2b066017ac5ac37db05f5281d26b2e8c6;p=yazproxy-moved-to-github.git Fix SEGV when reaching max-clients YPRX-20 --- diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index 943281c..266af40 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -803,18 +803,14 @@ Yaz_ProxyClient *Yaz_Proxy::get_client(Z_APDU *apdu, const char *cookie, return c; } } - else - { - - yaz_log(YLOG_LOG, "%sNEW %d %s", - m_session_str, parent->m_seqno, m_proxyTarget); - c = new Yaz_ProxyClient(m_PDU_Observable->clone(), parent); - c->m_next = parent->m_clientPool; - if (c->m_next) - c->m_next->m_prev = &c->m_next; - parent->m_clientPool = c; - c->m_prev = &parent->m_clientPool; - } + yaz_log(YLOG_LOG, "%sNEW %d %s", + m_session_str, parent->m_seqno, m_proxyTarget); + c = new Yaz_ProxyClient(m_PDU_Observable->clone(), parent); + c->m_next = parent->m_clientPool; + if (c->m_next) + c->m_next->m_prev = &c->m_next; + parent->m_clientPool = c; + c->m_prev = &parent->m_clientPool; xfree(c->m_cookie); c->m_cookie = 0;