Mercurial > vim
comparison src/eval.c @ 18225:6c3a8312486d v8.1.2107
patch 8.1.2107: various memory leaks reported by asan
Commit: https://github.com/vim/vim/commit/8617348e2110c2c8387ea448a6258f1effa8d249
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Oct 1 17:02:16 2019 +0200
patch 8.1.2107: various memory leaks reported by asan
Problem: Various memory leaks reported by asan.
Solution: Free the memory. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/5003)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 01 Oct 2019 17:15:04 +0200 |
parents | a6d218f99ff7 |
children | c8a53c0daeed |
comparison
equal
deleted
inserted
replaced
18224:96632a3c3d90 | 18225:6c3a8312486d |
---|---|
2912 semsg(_(e_nowhitespace)); | 2912 semsg(_(e_nowhitespace)); |
2913 else | 2913 else |
2914 semsg(_(e_missingparen), "lambda"); | 2914 semsg(_(e_missingparen), "lambda"); |
2915 } | 2915 } |
2916 clear_tv(rettv); | 2916 clear_tv(rettv); |
2917 return FAIL; | 2917 ret = FAIL; |
2918 } | 2918 } |
2919 return call_func_rettv(arg, rettv, evaluate, NULL, &base); | 2919 else |
2920 ret = call_func_rettv(arg, rettv, evaluate, NULL, &base); | |
2921 | |
2922 // Clear the funcref afterwards, so that deleting it while | |
2923 // evaluating the arguments is possible (see test55). | |
2924 if (evaluate) | |
2925 clear_tv(&base); | |
2926 | |
2927 return ret; | |
2920 } | 2928 } |
2921 | 2929 |
2922 /* | 2930 /* |
2923 * Evaluate "->method()". | 2931 * Evaluate "->method()". |
2924 * "*arg" points to the '-'. | 2932 * "*arg" points to the '-'. |