X-Git-Url: http://git.indexdata.com/?p=yazproxy-moved-to-github.git;a=blobdiff_plain;f=src%2Fyaz-proxy.cpp;h=686541356c8a7ae2fb620fde23e82080997e4d7f;hp=7233565766dde2bab3b2d6fe0f5ab63725121a9a;hb=84a66ec6eb9b25953cbdcf61c97ecc57c45066c4;hpb=2bfdeda2d9f42b091c9250a44ccda63cc9bdc723 diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index 7233565..6865413 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -340,6 +340,8 @@ Yaz_Proxy::~Yaz_Proxy() odr_destroy(m_s2z_odr_init); if (m_s2z_odr_search) odr_destroy(m_s2z_odr_search); + if (m_s2z_odr_scan) + odr_destroy(m_s2z_odr_scan); if (!m_parent) low_socket_close(); if (!m_parent) @@ -2774,8 +2776,10 @@ Z_APDU *Yaz_Proxy::handle_syntax_validation(Z_APDU *apdu) } if (m_backend_elementset) { - Z_ElementSetNames *esn = mk_esn_from_schema(odr_encode(), - m_backend_elementset); + Z_ElementSetNames *esn = + mk_esn_from_schema( + odr_encode(), + *m_backend_elementset ? m_backend_elementset : 0); sr->smallSetElementSetNames = esn; sr->mediumSetElementSetNames = esn; } @@ -2851,8 +2855,10 @@ Z_APDU *Yaz_Proxy::handle_syntax_validation(Z_APDU *apdu) } if (m_backend_elementset) { - Z_ElementSetNames *esn = mk_esn_from_schema(odr_encode(), - m_backend_elementset); + Z_ElementSetNames *esn = + mk_esn_from_schema( + odr_encode(), + *m_backend_elementset ? m_backend_elementset : 0); Z_RecordComposition *comp = (Z_RecordComposition *) odr_malloc(odr_encode(), sizeof(Z_RecordComposition)); comp->which = Z_RecordComp_simple;