From ccb3c75fabb36f293793a65d2b8fe05fc899656a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isaac=20S=C3=A1nchez=20Barrera?= Date: Fri, 15 Nov 2019 15:55:42 +0100 Subject: mem-cache: Fix destructor of `BasePrefetcher::PrefetchInfo`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The destructor of `BasePrefetcher::PrefetchInfo` was calling `delete` for a dynamically-allocated array. Changed to `delete[]` to remove potential undefined behaviour. Change-Id: I6f531bfb6fb7108f1d3e743ae0384d80173e15ef Signed-off-by: Isaac Sánchez Barrera Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22843 Reviewed-by: Nikos Nikoleris Maintainer: Nikos Nikoleris Tested-by: kokoro --- src/mem/cache/prefetch/base.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mem/cache/prefetch/base.hh b/src/mem/cache/prefetch/base.hh index e31dbfd40..77d2f3697 100644 --- a/src/mem/cache/prefetch/base.hh +++ b/src/mem/cache/prefetch/base.hh @@ -249,7 +249,7 @@ class BasePrefetcher : public ClockedObject ~PrefetchInfo() { - delete data; + delete[] data; } }; -- cgit v1.2.3