Fix some leaks (#863)

This commit is contained in:
Murat Seker
2020-07-12 09:22:05 +02:00
committed by GitHub
parent dd98e245fe
commit 69561aea9d
7 changed files with 23 additions and 14 deletions

View File

@@ -256,6 +256,7 @@ public:
{
_width = 1;
_height = 1;
delete[] _pixels;
_pixels = new Pixel_T[2];
_endOfPixels = _pixels + 1;
memset(_pixels, 0, (unsigned long) _width * _height * sizeof(Pixel_T));