Skip to content

Commit 7a450b4

Browse files
committed
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()
2 parents 4fd1359 + 2653a8c commit 7a450b4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

dir.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -564,9 +564,7 @@ void clear_exclude_list(struct exclude_list *el)
564564
free(el->excludes);
565565
free(el->filebuf);
566566

567-
el->nr = 0;
568-
el->excludes = NULL;
569-
el->filebuf = NULL;
567+
memset(el, 0, sizeof(*el));
570568
}
571569

572570
static void trim_trailing_spaces(char *buf)

0 commit comments

Comments
 (0)