From aa945bb371b5dbc6ce3f3633c52d073429693343 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 24 Oct 2016 13:26:24 +0200 Subject: [PATCH] ccstruct/polyblk: Fix memory leak Coverity report: CID 1164730 (#1 of 1): Resource leak (RESOURCE_LEAK) 4. leaked_storage: Variable lines going out of scope leaks the storage it points to. Signed-off-by: Stefan Weil --- ccstruct/polyblk.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ccstruct/polyblk.cpp b/ccstruct/polyblk.cpp index 158378859..e0a455905 100644 --- a/ccstruct/polyblk.cpp +++ b/ccstruct/polyblk.cpp @@ -294,6 +294,8 @@ void POLY_BLOCK::fill(ScrollView* window, ScrollView::Color colour) { } } } + + delete lines; } #endif