From: Kees Monshouwer Date: Mon, 30 Dec 2013 13:07:36 +0000 (+0100) Subject: fix cursor leak in goraclebackend X-Git-Tag: rec-3.6.0-rc1~274^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=77a4d0afdc5a86b974d7053019a29df84714a0eb;p=pdns fix cursor leak in goraclebackend --- diff --git a/modules/goraclebackend/soracle.cc b/modules/goraclebackend/soracle.cc index 9825eee75..d653e825b 100644 --- a/modules/goraclebackend/soracle.cc +++ b/modules/goraclebackend/soracle.cc @@ -112,7 +112,13 @@ SSqlException SOracle::sPerrorException(const string &reason) int SOracle::doCommand(const string &query) { - return doQuery(query); + int retval = doQuery(query); + if (d_handle) { + OCIHandleFree(d_handle, OCI_HTYPE_STMT); + d_handle=0; + } + + return retval; } int getNumFields(const string& query)