Mercurial > vim
view src/proto/vim9class.pro @ 31525:f7c82a85e88a v9.0.1095
patch 9.0.1095: using freed memory when declaration fails
Commit: https://github.com/vim/vim/commit/6ef5471afa69a654888bc285a51a6035405d33a0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 25 19:31:36 2022 +0000
patch 9.0.1095: using freed memory when declaration fails
Problem: Using freed memory when declaration fails. (Yegappan Lakshmanan)
Solution: After unreferencing an object set the reference to NULL.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 25 Dec 2022 20:45:04 +0100 |
parents | e31fc75f6aff |
children | 8bbc932fbd09 |
line wrap: on
line source
/* vim9class.c */ void ex_class(exarg_T *eap); type_T *class_member_type(class_T *cl, char_u *name, char_u *name_end, int *member_idx); void ex_interface(exarg_T *eap); void ex_enum(exarg_T *eap); void ex_type(exarg_T *eap); int class_object_index(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int verbose); ufunc_T *find_class_func(char_u **arg); void copy_object(typval_T *from, typval_T *to); void object_unref(object_T *obj); void copy_class(typval_T *from, typval_T *to); void class_unref(class_T *cl); void object_created(object_T *obj); void object_cleared(object_T *obj); int object_free_nonref(int copyID); /* vim: set ft=c : */