From 3b52ed60bb2d0e5887f3a5e93288de1a1339fce3 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Mon, 23 Dec 2019 12:59:51 +0100 Subject: [PATCH] Fix mismatching delete in IFF image handler code Use delete[] for a buffer allocated with new[]. Closes https://github.com/wxWidgets/wxWidgets/pull/1684 --- src/common/imagiff.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/imagiff.cpp b/src/common/imagiff.cpp index 0b5558d5bd..9f47504d66 100644 --- a/src/common/imagiff.cpp +++ b/src/common/imagiff.cpp @@ -414,7 +414,7 @@ int wxIFFDecoder::ReadIFF() const byte *cmapptr = dataptr + 8; colors = chunkLen / 3; // calc no of colors - wxDELETE(m_image->pal); + wxDELETEA(m_image->pal); m_image->colors = colors; if (colors > 0) { m_image->pal = new byte[3*colors];