From: Mike Taylor Date: Mon, 22 Sep 2003 12:25:20 +0000 (+0000) Subject: Fix reosurce leak on connection failure, thanks to Phil Dennis X-Git-Tag: YAZPP.0.7.pre1~21 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=3f1c0add4578af5dfe7257bf063b55cdf1b2638b;p=yazpp-moved-to-github.git Fix reosurce leak on connection failure, thanks to Phil Dennis --- diff --git a/zoom/zconn.cpp b/zoom/zconn.cpp index 17773c8..3b3137a 100644 --- a/zoom/zconn.cpp +++ b/zoom/zconn.cpp @@ -1,4 +1,4 @@ -// $Header: /home/cvsroot/yaz++/zoom/zconn.cpp,v 1.5 2003-07-02 10:25:13 adam Exp $ +// $Header: /home/cvsroot/yaz++/zoom/zconn.cpp,v 1.6 2003-09-22 12:25:20 mike Exp $ // Z39.50 Connection class @@ -17,6 +17,7 @@ namespace ZOOM { const char *addinfo; if ((errcode = ZOOM_connection_error(c, &errmsg, &addinfo)) != 0) { //###cerr << "oops: no connect, errcode=" << errcode << "\n"; + ZOOM_connection_destroy(c); throw bib1Exception(errcode, addinfo); } }