Fixing memory leak in ktlangc