From 5225520669e4667a8c6d6e0efd1a94b7d8fde6bc Mon Sep 17 00:00:00 2001 From: Th3maz1ng Date: Tue, 21 Jul 2020 09:45:40 +0200 Subject: [PATCH] Fixed potential memory leak :-( --- src/app/List.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/List.h b/src/app/List.h index d856117..393e05d 100644 --- a/src/app/List.h +++ b/src/app/List.h @@ -228,7 +228,10 @@ public: } int contains(T value) { - return contains(new T(value)); + T *obj = new T(value); + int result = contains(obj); + delete obj; + return result; } unsigned int count() {