]> granicus.if.org Git - pdns/commitdiff
fix cursor leak in goraclebackend
authorKees Monshouwer <mind04@monshouwer.org>
Mon, 30 Dec 2013 13:07:36 +0000 (14:07 +0100)
committermind04 <mind04@monshouwer.org>
Tue, 31 Dec 2013 13:24:21 +0000 (14:24 +0100)
modules/goraclebackend/soracle.cc

index 9825eee756a26bede3f88e48a963369873c15276..d653e825b7fd122ee60c28caf03f6a57ed7d39c9 100644 (file)
@@ -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)