diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2017-07-28 11:00:11 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-07-29 08:30:08 -0700 |
commit | 44e8d302effabc305cf79faebbe051eda959f006 (patch) | |
tree | 21ca1a610eedc7546301805c2526edbc76054f84 /core/git-access.c | |
parent | 7e52d112490d0c4fa86c20f558fedcf14e17ee0d (diff) | |
download | subsurface-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.c | 2 |
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)) |