Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-06-25 23:22:41 +0300
committerJunio C Hamano <gitster@pobox.com>2018-06-25 23:22:41 +0300
commit02f27d0dd0a9695fa8337c3ddd97a2b5ad0aec73 (patch)
treecc19ad364df8e03d5d9861520e1c50448a2b98a1 /builtin/submodule--helper.c
parent90fa1c5d6c00e44f4c901da0cf4015db916eca03 (diff)
parentf40f3c16cd3b0b5e696e62c08c84c8f527eaaf0e (diff)
Merge branch 'sb/plug-misc-leaks'
Misc leak plugging. * sb/plug-misc-leaks: sequencer.c: plug mem leak in git_sequencer_config sequencer.c: plug leaks in do_pick_commit submodule--helper: plug mem leak in print_default_remote refs/packed-backend.c: close fd of empty file
Diffstat (limited to 'builtin/submodule--helper.c')
-rw-r--r--builtin/submodule--helper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index c9c2f0e102..20ae9191ca 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -55,7 +55,7 @@ static char *get_default_remote(void)
static int print_default_remote(int argc, const char **argv, const char *prefix)
{
- const char *remote;
+ char *remote;
if (argc != 1)
die(_("submodule--helper print-default-remote takes no arguments"));
@@ -64,6 +64,7 @@ static int print_default_remote(int argc, const char **argv, const char *prefix)
if (remote)
printf("%s\n", remote);
+ free(remote);
return 0;
}