diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-07-14 16:59:57 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-07-14 16:59:57 +0200 |
commit | b28ebbca8400dccfc5eb9957ed96fcba9fe05e46 (patch) | |
tree | 8fa968011df56fec3f042429f66b41262ada7895 /src | |
parent | c8bbaa3b187bf934c400b9f60438283883aba9ac (diff) |
Fix using freed memory in :find completion.
Diffstat (limited to 'src')
-rw-r--r-- | src/misc1.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/misc1.c b/src/misc1.c index 675c2e77a5..493b532bd3 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -9550,15 +9550,14 @@ gen_expand_wildcards(num_pat, pat, num_file, file, flags) vim_free(t); } +#if defined(FEAT_SEARCHPATH) + if (flags & EW_PATH) + uniquefy_paths(&ga, p); +#endif if (p != pat[i]) vim_free(p); } -#if defined(FEAT_SEARCHPATH) - if (flags & EW_PATH) - uniquefy_paths(&ga, p); -#endif - *num_file = ga.ga_len; *file = (ga.ga_data != NULL) ? (char_u **)ga.ga_data : (char_u **)""; |