зеркало из https://github.com/microsoft/git.git
Merge branch 'nd/dir-exclude-cleanup' into maint
The "exclude_list" structure has the usual "alloc, nr" pair of fields to be used by ALLOC_GROW(), but clear_exclude_list() forgot to reset 'alloc' to 0 when it cleared 'nr' to discard the managed array. * nd/dir-exclude-cleanup: dir.c: clean the entire struct in clear_exclude_list()
This commit is contained in:
Коммит
af3e464a60
4
dir.c
4
dir.c
|
@ -564,9 +564,7 @@ void clear_exclude_list(struct exclude_list *el)
|
||||||
free(el->excludes);
|
free(el->excludes);
|
||||||
free(el->filebuf);
|
free(el->filebuf);
|
||||||
|
|
||||||
el->nr = 0;
|
memset(el, 0, sizeof(*el));
|
||||||
el->excludes = NULL;
|
|
||||||
el->filebuf = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void trim_trailing_spaces(char *buf)
|
static void trim_trailing_spaces(char *buf)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче