summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2017-12-03 19:40:47 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-12-03 19:07:03 -0800
commitfd34cd48306c2b81d6ccc2396b34bea670ec5c13 (patch)
tree2e6a11807a2c2a7eb2e4ae73c0247725046bc454 /core
parentfb7116a722439b0bedacc2e657db6da6f6fa32dd (diff)
downloadsubsurface-fd34cd48306c2b81d6ccc2396b34bea670ec5c13.tar.gz
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>
Diffstat (limited to 'core')
-rw-r--r--core/git-access.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/git-access.c b/core/git-access.c
index dc48546a6..40ee25600 100644
--- a/core/git-access.c
+++ b/core/git-access.c
@@ -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;
}