We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9590471 commit b8feb14Copy full SHA for b8feb14
1 file changed
lib/checkmemoryleak.cpp
@@ -517,7 +517,7 @@ void CheckMemoryLeakInClassImpl::check()
517
// only check classes and structures
518
for (const Scope * scope : symbolDatabase->classAndStructScopes) {
519
for (const Variable &var : scope->varlist) {
520
- if (!var.isStatic()) {
+ if (!var.isStatic() && (var.isPointer() || var.isPointerArray())) {
521
// allocation but no deallocation of private variables in public function..
522
const Token *tok = var.typeStartToken();
523
// Either it is of standard type or a non-derived type
0 commit comments