Fix a memory deallocation error that was crashing q2dm.

Also fix a bunch of compile warnings by changing "char *" to "const char *".
9 files changed