Mercurial > vim
comparison src/evalfunc.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 | e0ec4cd7a865 |
children | c8a53c0daeed |
comparison
equal
deleted
inserted
replaced
18224:96632a3c3d90 | 18225:6c3a8312486d |
---|---|
2211 --emsg_off; | 2211 --emsg_off; |
2212 if (rettv->v_type == VAR_LIST) | 2212 if (rettv->v_type == VAR_LIST) |
2213 { | 2213 { |
2214 if (rettv_list_alloc(rettv) != FAIL && result != NULL) | 2214 if (rettv_list_alloc(rettv) != FAIL && result != NULL) |
2215 list_append_string(rettv->vval.v_list, result, -1); | 2215 list_append_string(rettv->vval.v_list, result, -1); |
2216 else | 2216 vim_free(result); |
2217 vim_free(result); | |
2218 } | 2217 } |
2219 else | 2218 else |
2220 rettv->vval.v_string = result; | 2219 rettv->vval.v_string = result; |
2221 } | 2220 } |
2222 else | 2221 else |