From f58bc011a7c630b2eebb4c95a728c58c8ae52962 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Thu, 10 Jul 2014 22:11:43 +0200 Subject: [PATCH] Fix potential leak of branch in is_git_repository Signed-off-by: Anton Lundin Signed-off-by: Dirk Hohndel --- save-git.c | 1 + 1 file changed, 1 insertion(+) 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; }