Fix small memory leak

Add 2 forgotten free() statements for the temporary used string
buffers.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2017-07-28 11:00:11 +02:00 committed by Dirk Hohndel
parent 7e52d11249
commit 44e8d302ef

View file

@ -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))