Fix memleak in myshell.