On Wed, Dec 14, 2016 at 6:14 AM, Brandon Williams <bmwill@xxxxxxxxxx> wrote: > void clear_pathspec(struct pathspec *pathspec) > { > + int i; > + > + for (i = 0; i < pathspec->nr; i++) { > + free(pathspec->items[i].match); > + free(pathspec->items[i].original); > + } > free(pathspec->items); > pathspec->items = NULL; We should set pathspec->nr to zero so that calling this function again won't cause any harm. > } -- Duy