vim-patch:8.2.1265: crash with EXITFREE when split() fails

Problem:    Crash with EXITFREE when split() fails.
Solution:   Restore 'cpoptions'.
7d5e744162
This commit is contained in:
Jan Edmund Lazo 2020-07-21 19:55:05 -04:00
parent 9443d39941
commit 2d34ddb3c3
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15

View File

@ -9519,7 +9519,7 @@ static void f_split(typval_T *argvars, typval_T *rettv, FunPtr fptr)
tv_list_alloc_ret(rettv, kListLenMayKnow); tv_list_alloc_ret(rettv, kListLenMayKnow);
if (typeerr) { if (typeerr) {
return; goto theend;
} }
regmatch_T regmatch = { regmatch_T regmatch = {
@ -9563,6 +9563,7 @@ static void f_split(typval_T *argvars, typval_T *rettv, FunPtr fptr)
vim_regfree(regmatch.regprog); vim_regfree(regmatch.regprog);
} }
theend:
p_cpo = save_cpo; p_cpo = save_cpo;
} }