forked from qt-creator/qt-creator
Android: Fix memory leak
Delete the toolchain instance if not used Change-Id: I213f11d6f5e9ab3ffa98641d0a774a19e11849b3 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -471,8 +471,9 @@ AndroidToolChainFactory::autodetectToolChainsForNdk(const FileName &ndkPath,
|
|||||||
tc = new AndroidToolChain(abi, version, lang,
|
tc = new AndroidToolChain(abi, version, lang,
|
||||||
ToolChain::AutoDetection);
|
ToolChain::AutoDetection);
|
||||||
tc->resetToolChain(compilerPath);
|
tc->resetToolChain(compilerPath);
|
||||||
|
QTC_ASSERT(!tc->originalTargetTriple().isEmpty(),
|
||||||
|
delete tc; continue);
|
||||||
}
|
}
|
||||||
QTC_ASSERT(!tc->originalTargetTriple().isEmpty(), continue);
|
|
||||||
result.append(tc);
|
result.append(tc);
|
||||||
toolChainBundle.append(tc);
|
toolChainBundle.append(tc);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user