fix 2 (possible) memory leaks

While you're at it, can you change this to an assert(false) so we can at least get a line number printed before exit?