fix memory leak

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

(just press Enter)
Merge pull request #1 from starius/master

Fix memory leak (courtesy of Boris Nagaev).