Mercurial > vim
comparison src/popupwin.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 | 8d7899bd6bca |
children | e6c83ae0c4d0 |
comparison
equal
deleted
inserted
replaced
18224:96632a3c3d90 | 18225:6c3a8312486d |
---|---|
3363 char_u *title = alloc(len); | 3363 char_u *title = alloc(len); |
3364 | 3364 |
3365 trunc_string(wp->w_popup_title, title, total_width - 2, len); | 3365 trunc_string(wp->w_popup_title, title, total_width - 2, len); |
3366 screen_puts(title, wp->w_winrow, wp->w_wincol + 1, | 3366 screen_puts(title, wp->w_winrow, wp->w_wincol + 1, |
3367 wp->w_popup_border[0] > 0 ? border_attr[0] : popup_attr); | 3367 wp->w_popup_border[0] > 0 ? border_attr[0] : popup_attr); |
3368 vim_free(title); | |
3368 } | 3369 } |
3369 | 3370 |
3370 // Compute scrollbar thumb position and size. | 3371 // Compute scrollbar thumb position and size. |
3371 if (wp->w_has_scrollbar) | 3372 if (wp->w_has_scrollbar) |
3372 { | 3373 { |