/* The env would be set for the superproject. */
get_common_dir_noenv(&sb, submodule_gitdir);
+ free(submodule_gitdir);
/*
* The check below is only known to be good for repository format
/* See if there is any file inside the worktrees directory. */
dir = opendir(sb.buf);
strbuf_release(&sb);
- free(submodule_gitdir);
if (!dir)
return 0;