diff options
| author | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-11-09 21:12:05 +0100 | 
|---|---|---|
| committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-11-09 21:12:05 +0100 | 
| commit | 06712d8d173a61d5a9680a2a9a62350ed093b69d (patch) | |
| tree | b7f8a72832407b9f1de63bfd04183b5067ff711c /plugingui | |
| parent | a65ca7af57feaf7a4ea73f7e071a72eb9b3a1e24 (diff) | |
Fix mismatching malloc/delete\[\].
Diffstat (limited to 'plugingui')
| -rw-r--r-- | plugingui/image.cc | 4 | 
1 files 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);  } | 
