summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-07-10 22:11:43 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-10 13:25:25 -0700
commitf58bc011a7c630b2eebb4c95a728c58c8ae52962 (patch)
treecd10294a27ed591dd369e3b83c9be820f2406b8c
parent1a8e8be3a96380d39e4fc3fa79b5a24858f71deb (diff)
downloadsubsurface-f58bc011a7c630b2eebb4c95a728c58c8ae52962.tar.gz
Fix potential leak of branch in is_git_repository
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--save-git.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/save-git.c b/save-git.c
index 0ba6e9801..a1ef022fb 100644
--- a/save-git.c
+++ b/save-git.c
@@ -1093,6 +1093,7 @@ struct git_repository *is_git_repository(const char *filename, const char **bran
if (stat(loc, &st) < 0 || !S_ISDIR(st.st_mode)) {
free(loc);
+ free(branch);
return dummy_git_repository;
}