Mercurial > vim
comparison src/userfunc.c @ 23925:e979bf909fd8 v8.2.2505
patch 8.2.2505: Vim9: crash after defining function with invalid return type
Commit: https://github.com/vim/vim/commit/31842cd0772b557eb9584a13740430db29de8a51
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Feb 12 22:10:21 2021 +0100
patch 8.2.2505: Vim9: crash after defining function with invalid return type
Problem: Vim9: crash after defining function with invalid return type.
Solution: Clear function growarrays. Fix memory leak.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 12 Feb 2021 22:15:03 +0100 |
parents | d95403445b6b |
children | 03819ebd3e6d |
comparison
equal
deleted
inserted
replaced
23924:2f0d80c68af1 | 23925:e979bf909fd8 |
---|---|
3953 goto ret_free; | 3953 goto ret_free; |
3954 | 3954 |
3955 erret: | 3955 erret: |
3956 ga_clear_strings(&newargs); | 3956 ga_clear_strings(&newargs); |
3957 ga_clear_strings(&default_args); | 3957 ga_clear_strings(&default_args); |
3958 if (fp != NULL) | |
3959 { | |
3960 ga_init(&fp->uf_args); | |
3961 ga_init(&fp->uf_def_args); | |
3962 } | |
3958 errret_2: | 3963 errret_2: |
3959 ga_clear_strings(&newlines); | 3964 ga_clear_strings(&newlines); |
3965 if (fp != NULL) | |
3966 VIM_CLEAR(fp->uf_arg_types); | |
3960 ret_free: | 3967 ret_free: |
3961 ga_clear_strings(&argtypes); | 3968 ga_clear_strings(&argtypes); |
3962 vim_free(skip_until); | 3969 vim_free(skip_until); |
3963 vim_free(heredoc_trimmed); | 3970 vim_free(heredoc_trimmed); |
3964 vim_free(line_to_free); | 3971 vim_free(line_to_free); |