Skip to content

Commit b8feb14

Browse files
author
Aaron Danen
committed
revert check for alloc in ctor
1 parent 9590471 commit b8feb14

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/checkmemoryleak.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ void CheckMemoryLeakInClassImpl::check()
517517
// only check classes and structures
518518
for (const Scope * scope : symbolDatabase->classAndStructScopes) {
519519
for (const Variable &var : scope->varlist) {
520-
if (!var.isStatic()) {
520+
if (!var.isStatic() && (var.isPointer() || var.isPointerArray())) {
521521
// allocation but no deallocation of private variables in public function..
522522
const Token *tok = var.typeStartToken();
523523
// Either it is of standard type or a non-derived type

0 commit comments

Comments
 (0)