mirror of
https://github.com/git/git
synced 2024-08-28 12:09:19 +00:00
Merge branch 'cc/untracked'
Code cleanup. * cc/untracked: update-index: fix xgetcwd() related memory leak
This commit is contained in:
commit
77a24b7dc4
|
@ -125,12 +125,16 @@ static int test_if_untracked_cache_is_supported(void)
|
|||
struct stat st;
|
||||
struct stat_data base;
|
||||
int fd, ret = 0;
|
||||
char *cwd;
|
||||
|
||||
strbuf_addstr(&mtime_dir, "mtime-test-XXXXXX");
|
||||
if (!mkdtemp(mtime_dir.buf))
|
||||
die_errno("Could not make temporary directory");
|
||||
|
||||
fprintf(stderr, _("Testing mtime in '%s' "), xgetcwd());
|
||||
cwd = xgetcwd();
|
||||
fprintf(stderr, _("Testing mtime in '%s' "), cwd);
|
||||
free(cwd);
|
||||
|
||||
atexit(remove_test_directory);
|
||||
xstat_mtime_dir(&st);
|
||||
fill_stat_data(&base, &st);
|
||||
|
|
Loading…
Reference in a new issue