Fix cppcheck errors

See #286, newest comment. Two memory leaks and a syntax error if ARRAY_LISTS is ever defined.
I considered this, but take a look at lines 1299-1317. ```name``` is only created if DEB is defined. I put this in a separate ```ifdef``` in the case where DEB is defined but DRAW isn't (if that's even possible). This file actually needs further modification; if it is possible to have DEB defined and DRAW not defined, then the ifdefs should be changed.