diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-04-29 18:46:03 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-04-29 18:46:03 +0300 |
commit | 0dbc9060a69e4d64a01a6fefdabb78acc32fab95 (patch) | |
tree | 40e8777b05962216f720b4fe546dff0843f5bf91 /source/blender/imbuf/intern | |
parent | 091832c955992ecd8fff6d88028075775e4b4e8e (diff) |
Cleanup: make grumpy asan happy and do not use `new []` to allocate data freed by `free()`.
Probably nothing crucial, but asan build would crash on that stupid glitch... Annoying.
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/dds/DirectDrawSurface.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp index 15c8d86d61c..6bf82776afe 100644 --- a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp +++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp @@ -60,6 +60,7 @@ #include <PixelFormat.h> #include <stdio.h> // printf +#include <stdlib.h> // malloc #include <math.h> // sqrt #include <sys/types.h> @@ -1147,7 +1148,7 @@ void* DirectDrawSurface::readData(uint &rsize) uint size = stream.size - header_size; rsize = size; - unsigned char *data = new unsigned char[size]; + unsigned char *data = (unsigned char *)malloc(sizeof(*data) * size); stream.seek(header_size); mem_read(stream, data, size); |