Free unused git repository in git_create_local_repo()

In this function, a repository is created, but the returned object
is not used. Might just as well free it.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2017-12-03 19:40:47 +01:00 committed by Dirk Hohndel
parent fb7116a722
commit fd34cd4830

View file

@ -994,5 +994,6 @@ int git_create_local_repo(const char *filename)
free(path);
if (ret != 0)
(void)report_error("Create local repo failed with error code %d", ret);
git_repository_free(repo);
return ret;
}