From 814686f26bd62728b5255c4e88da5e022ec5aef0 Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Wed, 13 Feb 2013 12:51:44 +0100 Subject: [PATCH] Fix potential memory leak in query handling --- src/main/java/org/yaz4j/Connection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/yaz4j/Connection.java b/src/main/java/org/yaz4j/Connection.java index 49d5aea..3331052 100644 --- a/src/main/java/org/yaz4j/Connection.java +++ b/src/main/java/org/yaz4j/Connection.java @@ -95,11 +95,11 @@ public class Connection { } SWIGTYPE_p_ZOOM_resultset_p yazResultSet = yaz4jlib.ZOOM_connection_search( zoomConnection, yazQuery); + yaz4jlib.ZOOM_query_destroy(yazQuery); ZoomException err = ExceptionUtil.getError(zoomConnection, host, port); if (err != null) { yaz4jlib.ZOOM_resultset_destroy(yazResultSet); - yaz4jlib.ZOOM_query_destroy(yazQuery); throw err; } return new ResultSet(yazResultSet, this); -- 1.7.10.4