A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vim/vim/commit/03d6e06edd0aaf2f591d74349cb25dbeca5895ef below:

memory leak in fuzzy.c · vim/vim@03d6e06 · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+11

-5

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+11

-5

lines changed Original file line number Diff line number Diff line change

@@ -2971,7 +2971,11 @@ ExpandBufnames(

2971 2971

else

2972 2972

p = vim_strsave(p);

2973 2973

if (p == NULL)

2974 +

{

2975 +

if (fuzzy && round == 2)

2976 +

fuzmatch_str_free(fuzmatch, count);

2974 2977

return FAIL;

2978 +

}

2975 2979 2976 2980

if (!fuzzy)

2977 2981

{

Original file line number Diff line number Diff line change

@@ -868,11 +868,10 @@ search_for_fuzzy_match(

868 868

void

869 869

fuzmatch_str_free(fuzmatch_str_T *fuzmatch, int count)

870 870

{

871 -

int i;

872 - 873 871

if (fuzmatch == NULL)

874 872

return;

875 -

for (i = 0; i < count; ++i)

873 + 874 +

for (int i = 0; i < count; ++i)

876 875

vim_free(fuzmatch[i].str);

877 876

vim_free(fuzmatch);

878 877

}

@@ -892,7 +891,7 @@ fuzzymatches_to_strmatches(

892 891

int i;

893 892 894 893

if (count <= 0)

895 -

return OK;

894 +

goto theend;

896 895 897 896

*matches = ALLOC_MULT(char_u *, count);

898 897

if (*matches == NULL)

@@ -909,8 +908,9 @@ fuzzymatches_to_strmatches(

909 908 910 909

for (i = 0; i < count; i++)

911 910

(*matches)[i] = fuzmatch[i].str;

912 -

vim_free(fuzmatch);

913 911 912 +

theend:

913 +

vim_free(fuzmatch);

914 914

return OK;

915 915

}

916 916 Original file line number Diff line number Diff line change

@@ -719,6 +719,8 @@ static char *(features[]) =

719 719 720 720

static int included_patches[] =

721 721

{ /* Add new patch number below this line */

722 +

/**/

723 +

1632,

722 724

/**/

723 725

1631,

724 726

/**/

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4