From 3f1c0add4578af5dfe7257bf063b55cdf1b2638b Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 22 Sep 2003 12:25:20 +0000 Subject: [PATCH] Fix reosurce leak on connection failure, thanks to Phil Dennis --- zoom/zconn.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } } -- 1.7.10.4