summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHonglei Zhang <honglei.zhang@nokia.com>2012-04-27 07:59:51 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-04-27 11:25:10 (GMT)
commitae551cbdba9b58844603fde52b950b21ea0cbbc6 (patch)
treed4fb2a6197442b618e3a7685c51539c6ac6013d8 /src
parent473e2d311ea8ec701e8c915f5c5d8b1f99209374 (diff)
downloadQt-ae551cbdba9b58844603fde52b950b21ea0cbbc6.zip
Qt-ae551cbdba9b58844603fde52b950b21ea0cbbc6.tar.gz
Qt-ae551cbdba9b58844603fde52b950b21ea0cbbc6.tar.bz2
Fix memory leak in 64-bits ODBC driver
This fix complements the commit 8c28db8cda. A similiar function call was forgotten in the previous fix. Task-number: QTBUG-25256 Change-Id: I38880e755a78951985484b718c89ac43a6dc2b4c Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Diffstat (limited to 'src')
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index 9c3f6fc..a1324e5 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -968,7 +968,8 @@ bool QODBCResult::reset (const QString& query)
return true;
}
- SQLINTEGER isScrollable, bufferLength;
+ SQLULEN isScrollable = 0;
+ SQLINTEGER bufferLength;
r = SQLGetStmtAttr(d->hStmt, SQL_ATTR_CURSOR_SCROLLABLE, &isScrollable, SQL_IS_INTEGER, &bufferLength);
if(r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO)
QSqlResult::setForwardOnly(isScrollable==SQL_NONSCROLLABLE);