diff options
Diffstat (limited to 'pathspec.c')
| -rw-r--r-- | pathspec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pathspec.c b/pathspec.c index 303efda837..50f76fff45 100644 --- a/pathspec.c +++ b/pathspec.c @@ -505,7 +505,7 @@ static void init_pathspec_item(struct pathspec_item *item, unsigned flags, * original. Useful for passing to another command. */ if ((flags & PATHSPEC_PREFIX_ORIGIN) && - prefixlen && !get_literal_global()) { + !get_literal_global()) { struct strbuf sb = STRBUF_INIT; /* Preserve the actual prefix length of each pattern */ @@ -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); |
