mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-20 22:26:28 +00:00
Fix memory leak
This commit is contained in:
parent
8df9ccc72c
commit
37afd7aaa7
1 changed files with 2 additions and 1 deletions
|
|
@ -128,8 +128,9 @@ run_search(Options *opts, GlobalData *global, const char * const *lines, const s
|
|||
Chars chars = {0};
|
||||
|
||||
ALLOC_VEC(text_t, chars, 8192 * 20);
|
||||
if (chars.data == NULL) return 1;
|
||||
ALLOC_VEC(Candidate, candidates, 8192);
|
||||
if (chars.data == NULL || candidates.data == NULL) return 1;
|
||||
if (candidates.data == NULL) { FREE_VEC(candidates) return 1; }
|
||||
|
||||
for (size_t i = 0; i < num_lines; i++) {
|
||||
sz = sizes[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue