Mercurial > vim
comparison src/evalvars.c @ 27307:bb36a04d7e34 v8.2.4182
patch 8.2.4182: memory leak when evaluating 'diffexpr'
Commit: https://github.com/vim/vim/commit/39b8944539a9cde553fe709e535fdfd37d0f9307
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 22 18:21:36 2022 +0000
patch 8.2.4182: memory leak when evaluating 'diffexpr'
Problem: Memory leak when evaluating 'diffexpr'.
Solution: Use free_tv() instead of clear_tv().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 22 Jan 2022 19:30:02 +0100 |
parents | 30d8437ad7cc |
children | a195a900a329 |
comparison
equal
deleted
inserted
replaced
27306:2d3f381a0f64 | 27307:bb36a04d7e34 |
---|---|
427 if (ctx != NULL) | 427 if (ctx != NULL) |
428 current_sctx = *ctx; | 428 current_sctx = *ctx; |
429 | 429 |
430 // errors are ignored | 430 // errors are ignored |
431 tv = eval_expr(p_dex, NULL); | 431 tv = eval_expr(p_dex, NULL); |
432 clear_tv(tv); | 432 free_tv(tv); |
433 | 433 |
434 set_vim_var_string(VV_FNAME_IN, NULL, -1); | 434 set_vim_var_string(VV_FNAME_IN, NULL, -1); |
435 set_vim_var_string(VV_FNAME_NEW, NULL, -1); | 435 set_vim_var_string(VV_FNAME_NEW, NULL, -1); |
436 set_vim_var_string(VV_FNAME_OUT, NULL, -1); | 436 set_vim_var_string(VV_FNAME_OUT, NULL, -1); |
437 current_sctx = saved_sctx; | 437 current_sctx = saved_sctx; |