From: Adam Dickmeiss Date: Thu, 24 Jun 2010 13:55:38 +0000 (+0200) Subject: Z39.50 client: fix NULL ptr reference. X-Git-Tag: v1.1.7~7 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=b10c3228b6cb7b712a35d3d6aed029bb06e707da;p=metaproxy-moved-to-github.git Z39.50 client: fix NULL ptr reference. The NULL ptr reference could occur if two or more new client was checked for number of sockets . In this case host in Z39.50 Assoc would be NULL - prior to call to method 'client'. --- diff --git a/src/filter_z3950_client.cpp b/src/filter_z3950_client.cpp index 601af44..683c09a 100644 --- a/src/filter_z3950_client.cpp +++ b/src/filter_z3950_client.cpp @@ -309,7 +309,7 @@ yf::Z3950Client::Assoc *yf::Z3950Client::Rep::get_assoc(Package &package) for (; it != m_clients.end(); it++) { yf::Z3950Client::Assoc *as = it->second; - if (!strcmp(as->get_hostname(), host.c_str())) + if (!strcmp(as->m_host.c_str(), host.c_str())) { number++; if (!as->m_in_use)