File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## node-oracledb v1.4.0 (DD Mon YYYY)
4
4
5
+ - Fixed cursor leak when statements execution fails.
6
+
5
7
## node-oracledb v1.3.0 (15 Oct 2015)
6
8
7
9
- Added a ` oracledb.oracleClientVersion ` property giving the version of the Oracle
Original file line number Diff line number Diff line change @@ -945,7 +945,7 @@ void Connection::Async_Execute (uv_work_t *req)
945
945
{
946
946
executeBaton->error = NJSMessages::getErrorMsg (
947
947
errBufferReturningInvalid );
948
- return ;
948
+ goto exitAsyncExecute ;
949
949
950
950
}
951
951
}
@@ -1005,7 +1005,7 @@ void Connection::Async_Execute (uv_work_t *req)
1005
1005
{
1006
1006
executeBaton->error = NJSMessages::getErrorMsg (
1007
1007
errSQLSyntaxError );
1008
- return ;
1008
+ goto exitAsyncExecute ;
1009
1009
}
1010
1010
}
1011
1011
}
@@ -1090,10 +1090,7 @@ void Connection::Async_Execute (uv_work_t *req)
1090
1090
// process any lob descriptor out binds
1091
1091
Connection::Descr2protoILob ( executeBaton, 0 , 0 );
1092
1092
}
1093
- if ( executeBaton->dpistmt )
1094
- {
1095
- executeBaton->dpistmt ->release ();
1096
- }
1093
+ // dpistmt will be released in exitAsyncExecute label in case of non-RS
1097
1094
}
1098
1095
catch (dpi::Exception& e)
1099
1096
{
@@ -1113,6 +1110,16 @@ void Connection::Async_Execute (uv_work_t *req)
1113
1110
}
1114
1111
}
1115
1112
exitAsyncExecute:
1113
+ /* Release the statement handle in case of errors or non-ResultSet
1114
+ * In case of ResultSet and no errors, statement handle will be released
1115
+ * while closing it.
1116
+ */
1117
+ if ( ( ( !(executeBaton->error ).empty () ) ||
1118
+ ( !executeBaton->getRS ) ) &&
1119
+ executeBaton->dpistmt )
1120
+ {
1121
+ executeBaton->dpistmt ->release ();
1122
+ }
1116
1123
;
1117
1124
}
1118
1125
You can’t perform that action at this time.
0 commit comments