diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-04-30 14:27:13 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-05-01 00:06:16 +0200 |
commit | 772a749c7eee1f32de75ce26ee8beb6d9cf9ff46 (patch) | |
tree | ba7b2075e9a5900d9e6c80afafe7a24f7d15c5ea /src/assistant/help/qhelpcollectionhandler.cpp | |
parent | 3aab1811a00495ef491f7e15eb616156668876ba (diff) |
Plug memory leak when tables can't be created
Delete the query object if function has to return prematurely.
Fixes: QTBUG-83913
Change-Id: I82e4ca54f95970cb4ccb3985cec5389288e23fde
Coverity-Id: 21930
Pick-to: 5.15
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/assistant/help/qhelpcollectionhandler.cpp')
-rw-r--r-- | src/assistant/help/qhelpcollectionhandler.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/assistant/help/qhelpcollectionhandler.cpp b/src/assistant/help/qhelpcollectionhandler.cpp index 29178bb55..48b09594d 100644 --- a/src/assistant/help/qhelpcollectionhandler.cpp +++ b/src/assistant/help/qhelpcollectionhandler.cpp @@ -381,6 +381,7 @@ bool QHelpCollectionHandler::copyCollectionFile(const QString &fileName) if (!createTables(copyQuery) || !recreateIndexAndNamespaceFilterTables(copyQuery)) { emit error(tr("Cannot copy collection file: %1").arg(colFile)); + delete copyQuery; return false; } |