Merge branch 'mt/dir-iterator-updates'
authorJunio C Hamano <gitster@pobox.com>
Fri, 9 Aug 2019 17:13:14 +0000 (10:13 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Aug 2019 17:13:14 +0000 (10:13 -0700)
Leakfix.

* mt/dir-iterator-updates:
test-dir-iterator: use path argument directly
dir-iterator: release strbuf after use

1  2 
t/helper/test-dir-iterator.c
index c7c30664dad2a027c4cf6b0bac7ecb78080cbcf1,b421d2bf3864e9a5c35a1ef9f47cb4e452dd40d5..659b6bfa81df6d0bcffb8d0a975492d54d79d6bc
@@@ -36,11 -26,10 +35,10 @@@ int cmd__dir_iterator(int argc, const c
        if (!*argv || argc != 1)
                die("dir-iterator needs exactly one non-option argument");
  
-       strbuf_add(&path, *argv, strlen(*argv));
-       diter = dir_iterator_begin(path.buf, flags);
+       diter = dir_iterator_begin(*argv, flags);
  
        if (!diter) {
 -              printf("dir_iterator_begin failure: %d\n", errno);
 +              printf("dir_iterator_begin failure: %s\n", error_name(errno));
                exit(EXIT_FAILURE);
        }