aboutsummaryrefslogtreecommitdiffstats
path: root/core/git-access.c
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2017-07-28 11:00:11 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-29 08:30:08 -0700
commit44e8d302effabc305cf79faebbe051eda959f006 (patch)
tree21ca1a610eedc7546301805c2526edbc76054f84 /core/git-access.c
parent7e52d112490d0c4fa86c20f558fedcf14e17ee0d (diff)
downloadsubsurface-44e8d302effabc305cf79faebbe051eda959f006.tar.gz
Fix small memory leak
Add 2 forgotten free() statements for the temporary used string buffers. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'core/git-access.c')
-rw-r--r--core/git-access.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/git-access.c b/core/git-access.c
index dbb8dabd4..bfb3659bb 100644
--- a/core/git-access.c
+++ b/core/git-access.c
@@ -700,6 +700,8 @@ static git_repository *create_and_push_remote(const char *localdir, const char *
merge_head = malloc(len);
snprintf(merge_head, len, "refs/heads/%s", branch);
git_config_set_string(conf, variable_name, merge_head);
+ free(variable_name);
+ free(merge_head);
/* finally create an empty commit and push it to the remote */
if (do_git_save(repo, branch, remote, false, true))