From: Adam Dickmeiss Date: Mon, 20 Oct 2003 18:20:55 +0000 (+0000) Subject: Fix leak in GFS that occurred when on ODR decoding error X-Git-Tag: YAZ.2.0.5.pre2~12 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=ea27f95dc32881b53a436c22b92e704f28a553a6;p=yaz-moved-to-github.git Fix leak in GFS that occurred when on ODR decoding error --- diff --git a/server/requestq.c b/server/requestq.c index 26d9b43..63ce3f3 100644 --- a/server/requestq.c +++ b/server/requestq.c @@ -1,40 +1,9 @@ /* - * Copyright (C) 1994-1998, Index Data. + * Copyright (C) 1994-2003, Index Data. * See the file LICENSE for details. * Sebastian Hammer, Adam Dickmeiss * - * $Log: requestq.c,v $ - * Revision 1.9 2003-02-12 15:06:43 adam - * SOAP, SRW codecs and HTTP transport for YAZ using libxml2. - * Updated ASN.1 for Z39.50 amendment String Identifiers for Schemas. - * - * Revision 1.8 2001/07/19 19:51:41 adam - * Added typecasts to make C++ happy. - * - * Revision 1.7 1999/11/30 13:47:12 adam - * Improved installation. Moved header files to include/yaz. - * - * Revision 1.6 1998/02/11 11:53:35 adam - * Changed code so that it compiles as C++. - * - * Revision 1.5 1998/02/10 11:03:56 adam - * Added support for extended handlers in backend server interface. - * - * Revision 1.4 1997/10/27 13:55:03 adam - * Fixed memory leak: member response wasn't freed when queue - * was destroyed. - * - * Revision 1.3 1997/09/01 08:53:00 adam - * New windows NT/95 port using MSV5.0. The test server 'ztest' was - * moved a separate directory. MSV5.0 project server.dsp created. - * As an option, the server can now operate as an NT service. - * - * Revision 1.2 1995/11/01 13:54:57 quinn - * Minor adjustments - * - * Revision 1.1 1995/05/15 12:12:22 quinn - * Request queue. - * + * $Id: requestq.c,v 1.10 2003-10-20 18:20:55 adam Exp $ * */ diff --git a/server/seshigh.c b/server/seshigh.c index eedf040..1478dea 100644 --- a/server/seshigh.c +++ b/server/seshigh.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: seshigh.c,v 1.161 2003-09-09 16:03:46 mike Exp $ + * $Id: seshigh.c,v 1.162 2003-10-20 18:20:55 adam Exp $ */ /* @@ -221,7 +221,9 @@ static void do_close_req(association *a, int reason, char *message, static void do_close(association *a, int reason, char *message) { - do_close_req (a, reason, message, request_get(&a->outgoing)); + request *req = request_get(&a->outgoing); + request_release(req); + do_close_req (a, reason, message, req); } /* @@ -336,7 +338,8 @@ void ir_session(IOCHAN h, int event) { yaz_log(LOG_LOG, "PDU dump:"); odr_dumpBER(yaz_log_file(), assoc->input_buffer, res); - do_close(assoc, Z_Close_protocolError, "Malformed package"); + request_release(req); + do_close(assoc, Z_Close_protocolError,"Malformed package"); } else {