Mercurial > vim
comparison src/evalfunc.c @ 13236:fee03d646e42 v8.0.1492
patch 8.0.1492: memory leak in balloon_split()
commit https://github.com/vim/vim/commit/b301f6b950975b9d7ae87a4f551b32bba63ccdcf
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 10 15:38:35 2018 +0100
patch 8.0.1492: memory leak in balloon_split()
Problem: Memory leak in balloon_split().
Solution: Free the balloon lines. Free the balloon when exiting.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 10 Feb 2018 15:45:07 +0100 |
parents | 93efa1de7abb |
children | ac42c4b11dbc |
comparison
equal
deleted
inserted
replaced
13235:6f7bfbf0f237 | 13236:fee03d646e42 |
---|---|
1445 int i; | 1445 int i; |
1446 | 1446 |
1447 /* Skip the first and last item, they are always empty. */ | 1447 /* Skip the first and last item, they are always empty. */ |
1448 for (i = 1; i < size - 1; ++i) | 1448 for (i = 1; i < size - 1; ++i) |
1449 list_append_string(rettv->vval.v_list, array[i].pum_text, -1); | 1449 list_append_string(rettv->vval.v_list, array[i].pum_text, -1); |
1450 while (size > 0) | |
1451 vim_free(array[--size].pum_text); | |
1450 vim_free(array); | 1452 vim_free(array); |
1451 } | 1453 } |
1452 } | 1454 } |
1453 } | 1455 } |
1454 # endif | 1456 # endif |