perf: add a comparison test of log --grep regex engines with -F
[gitweb.git] / pathspec.c
index 3079a817a1a3dc5768e8d6a704a2bd3990b3cbcf..50f76fff458e45f57ae67c3474de8378f390f978 100644 (file)
@@ -724,7 +724,7 @@ void clear_pathspec(struct pathspec *pathspec)
                free(pathspec->items[i].match);
                free(pathspec->items[i].original);
 
-               for (j = 0; j < pathspec->items[j].attr_match_nr; j++)
+               for (j = 0; j < pathspec->items[i].attr_match_nr; j++)
                        free(pathspec->items[i].attr_match[j].value);
                free(pathspec->items[i].attr_match);