Mercurial > vim
view src/typemap @ 20844:1360541e8c74 v8.2.0974
patch 8.2.0974: Vim9: memory leak when script var has wrong type
Commit: https://github.com/vim/vim/commit/f3decc5830ef8d8d94902b76114935283dd4142e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 13 19:56:38 2020 +0200
patch 8.2.0974: Vim9: memory leak when script var has wrong type
Problem: Vim9: memory leak when script var has wrong type.
Solution: Free the variable name.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 13 Jun 2020 20:00:04 +0200 |
parents | dec4338a7da2 |
children |
line wrap: on
line source
TYPEMAP VIWIN T_VIOBJNOMUNGE VIBUF T_VIOBJNOMUNGE INPUT T_VIOBJNOMUNGE if (sv_isa($arg, \"${ntype}\")) { IV tmp = SvIV((SV*)SvRV($arg)); $var = INT2PTR($type, tmp); if (!tmp) croak(\"$ntype no longer exists\"); } else croak(\"$var is not of type ${ntype}\")