[Bug 1011333] PerlIO::via leaks a foreign memory