summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/sqldrivers/ibase/qsql_ibase.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
index f14cb2e15b..4c1178f3c3 100644
--- a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
+++ b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
@@ -1055,10 +1055,10 @@ bool QIBaseResult::exec()
}
if (ok) {
+ isc_dsql_free_statement(d->status, &d->stmt, DSQL_close);
+ if (d->isError(QT_TRANSLATE_NOOP("QIBaseResult", "Unable to close statement")))
+ return false;
if (colCount() && d->queryType != isc_info_sql_stmt_exec_procedure) {
- isc_dsql_free_statement(d->status, &d->stmt, DSQL_close);
- if (d->isError(QT_TRANSLATE_NOOP("QIBaseResult", "Unable to close statement")))
- return false;
cleanup();
}
if (d->queryType == isc_info_sql_stmt_exec_procedure)