fix memory leak

How to reproduce this memory leak in previous versions:
$ ./luap
>
>
>

(just press Enter)