diff options
| author | Junio C Hamano <gitster@pobox.com> | 2016-01-20 11:43:24 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2016-01-20 11:43:24 -0800 |
| commit | 7a450b48e765e957762b015f30c89f21b1028771 (patch) | |
| tree | e3159b57e83b614d4790f6546c956cb735808f1d | |
| parent | Merge branch 'jk/pack-revindex' (diff) | |
| parent | dir.c: clean the entire struct in clear_exclude_list() (diff) | |
| download | git-7a450b48e765e957762b015f30c89f21b1028771.tar.gz git-7a450b48e765e957762b015f30c89f21b1028771.zip | |
Merge branch 'nd/dir-exclude-cleanup'
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()
| -rw-r--r-- | dir.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -564,9 +564,7 @@ void clear_exclude_list(struct exclude_list *el) free(el->excludes); free(el->filebuf); - el->nr = 0; - el->excludes = NULL; - el->filebuf = NULL; + memset(el, 0, sizeof(*el)); } static void trim_trailing_spaces(char *buf) |
