Commit Graph
3 Commits
Author SHA1 Message Date
Rikard Falkeborn cfa9afee31 Add checks for memory failures 2018-11-28 00:38:01 +01:00
Rikard Falkeborn 5c845c5006 Free memory
This makes psdpng run clean under address sanitizer and valgrind.
2018-11-28 00:38:01 +01:00
Rikard Falkeborn d8ccb037a0 Fix memset size
In the call to memset(), the size of the pointer to mag2buf was
erroneously used instead of size of what mag2buf pointed to (float).
This leads to problems on systems where the size of the pointer is
different from the size of floats. Instead of just fixing the size,
use calloc() instead of malloc() to directly set the memory to 0.
2018-11-28 00:37:29 +01:00