vim-patch:9.2.0097: Memory leak in qf_push_dir()

Problem:  Memory leak in qf_push_dir() (after v9.2.0091)
Problem:  free dirname, if it is not a directory.

closes: vim/vim#19552

e352bb632a

Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2026-03-04 09:07:34 +08:00
parent 0cfeedb088
commit 0676503ab5

View File

@@ -2390,7 +2390,7 @@ static char *qf_push_dir(char *dirbuf, struct dir_stack_T **stackptr, bool is_fi
(*stackptr)->dirname = dirname;
break;
}
xfree(dirname);
ds_new = ds_new->next;
}