From 06712d8d173a61d5a9680a2a9a62350ed093b69d Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 9 Nov 2015 21:12:05 +0100 Subject: Fix mismatching malloc/delete\[\]. --- plugingui/image.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugingui/image.cc b/plugingui/image.cc index 6c16a69..ecd16ac 100644 --- a/plugingui/image.cc +++ b/plugingui/image.cc @@ -49,7 +49,7 @@ Image::Image(const std::string& filename) Image::~Image() { - delete[] image_data; + free(image_data); } void Image::setError(int err) @@ -70,7 +70,7 @@ void Image::setError(int err) _height = ih; size_t image_size = rc.size() - (sizeof(iw) + sizeof(ih)); - image_data = new unsigned char[image_size]; + image_data = (unsigned char*)malloc(image_size); memcpy(image_data, p, image_size); } -- cgit v1.2.3