androiddeplyqt: fix more missing pclose() on early returns
Found by Coverity. This code predates the move of androiddeployqt to qtbase. Pick-to: 6.6 6.5 6.2 5.15 Coverity-Id: 378442 Change-Id: Icc24918159132c55a3817eaf19c96ea212dfa6dc Reviewed-by: BogDan Vatra <bogdan@kdab.com> (cherry picked from commit db240d99cffbc3af2eb39a5f7d48e68e57b85271) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
950123bfbc
commit
76807bdfb7
@ -2203,6 +2203,7 @@ bool scanImports(Options *options, QSet<QString> *usedDependencies)
|
||||
QJsonDocument jsonDocument = QJsonDocument::fromJson(output);
|
||||
if (jsonDocument.isNull()) {
|
||||
fprintf(stderr, "Invalid json output from qmlimportscanner.\n");
|
||||
pclose(qmlImportScannerCommand);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2211,6 +2212,7 @@ bool scanImports(Options *options, QSet<QString> *usedDependencies)
|
||||
QJsonValue value = jsonArray.at(i);
|
||||
if (!value.isObject()) {
|
||||
fprintf(stderr, "Invalid format of qmlimportscanner output.\n");
|
||||
pclose(qmlImportScannerCommand);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2256,6 +2258,7 @@ bool scanImports(Options *options, QSet<QString> *usedDependencies)
|
||||
|
||||
if (importPathOfThisImport.isEmpty()) {
|
||||
fprintf(stderr, "Import found outside of import paths: %s.\n", qPrintable(info.absoluteFilePath()));
|
||||
pclose(qmlImportScannerCommand);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2323,6 +2326,7 @@ bool scanImports(Options *options, QSet<QString> *usedDependencies)
|
||||
}
|
||||
}
|
||||
|
||||
pclose(qmlImportScannerCommand);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user