Skip to content

Commit f7e5191

Browse files
ludviggunneAaron Danen
andcommitted
unsafeClassCanLeak fix
Co-authored-by: Aaron Danen <aaron.danen@hpe.com>
1 parent 6676ad0 commit f7e5191

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() && (var.isPointer() || var.isPointerArray())) {
520+
if (!var.isStatic()) {
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)