summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dal/sqlitedataprovider.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dal/sqlitedataprovider.cpp b/src/dal/sqlitedataprovider.cpp
index 8018098f..a9ed365d 100644
--- a/src/dal/sqlitedataprovider.cpp
+++ b/src/dal/sqlitedataprovider.cpp
@@ -130,7 +130,13 @@ SqLiteDataProvider::execSql(const std::string& sql,
);
if (errCode != SQLITE_OK) {
- throw DbSqlQueryExecFailure(sqlite3_errmsg(mDb));
+ std::string msg(sqlite3_errmsg(mDb));
+
+ // free memory
+ sqlite3_free_table(result);
+ delete errMsg;
+
+ throw DbSqlQueryExecFailure(msg);
}
// the first row of result[] contains the field names.