diff options
| author | Junio C Hamano <gitster@pobox.com> | 2018-11-13 22:37:26 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-11-13 22:37:26 +0900 |
| commit | f22838aa7a6dcf308a3307ba17f8afa40989ad3a (patch) | |
| tree | f7e4b72da742a8e1fb4d86a2a17e9ff103841e5f /dir.c | |
| parent | e146cc97be4c054c60d38e9f4edcdc33205bf563 (diff) | |
| parent | aa097b88e91bd748c4508b042e618e8292e15ad5 (diff) | |
| download | git-f22838aa7a6dcf308a3307ba17f8afa40989ad3a.tar.gz | |
Merge branch 'jk/misc-unused-fixes'
Assorted fixes for bugs found while auditing -Wunused-parameter
warnings.
* jk/misc-unused-fixes:
approxidate: fix NULL dereference in date_time()
pathspec: handle non-terminated strings with :(attr)
approxidate: handle pending number for "specials"
rev-list: handle flags for --indexed-objects
Diffstat (limited to 'dir.c')
| -rw-r--r-- | dir.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -281,8 +281,15 @@ static int match_attrs(const struct index_state *istate, const struct pathspec_item *item) { int i; + char *to_free = NULL; + + if (name[namelen]) + name = to_free = xmemdupz(name, namelen); git_check_attr(istate, name, item->attr_check); + + free(to_free); + for (i = 0; i < item->attr_match_nr; i++) { const char *value; int matched; |
