From 963b935e80c1170645423875e37b87da7db069ec Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 24 Oct 2016 13:42:18 +0200 Subject: [PATCH] classify/adaptmatch: Fix memory leak Coverity report: CID 1164738 (#1 of 1): Resource leak (RESOURCE_LEAK) 7. leaked_storage: Variable sample going out of scope leaks the storage it points to. Signed-off-by: Stefan Weil --- classify/adaptmatch.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/classify/adaptmatch.cpp b/classify/adaptmatch.cpp index b89f1cb7ae..9ab95a68b9 100644 --- a/classify/adaptmatch.cpp +++ b/classify/adaptmatch.cpp @@ -1001,6 +1001,8 @@ void Classify::DisplayAdaptedChar(TBLOB* blob, INT_CLASS_STRUCT* int_class) { 6 | 0x19, matcher_debug_separate_windows); UpdateMatchDisplay(); } + + delete sample; #endif }