aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSverre Rabbelier <srabbelier@gmail.com>2009-11-18 02:42:29 +0100
committerJunio C Hamano <gitster@pobox.com>2009-11-17 21:45:44 -0800
commitb962dbdc806510a4572a5574245d825a414231ab (patch)
tree38ee413d011d07d38eef279f5146340cbb899797
parent72ff894308d4f6eb9f081167377857f7a3268bca (diff)
downloadgit-b962dbdc806510a4572a5574245d825a414231ab.tar.gz
git-b962dbdc806510a4572a5574245d825a414231ab.tar.xz
Fix various memory leaks in transport-helper.c
Found with: valgrind --tool=memcheck --leak-check=full --show-reachable=yes Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--transport-helper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/transport-helper.c b/transport-helper.c
index da8185a98..628a5ca21 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -74,6 +74,7 @@ static struct child_process *get_helper(struct transport *transport)
}
free(refspecs);
}
+ strbuf_release(&buf);
return data->helper;
}
@@ -163,6 +164,8 @@ static int fetch_with_import(struct transport *transport,
}
disconnect_helper(transport);
finish_command(&fastimport);
+ free(fastimport.argv);
+ fastimport.argv = NULL;
for (i = 0; i < nr_heads; i++) {
char *private;
@@ -176,6 +179,7 @@ static int fetch_with_import(struct transport *transport,
read_ref(private, posn->old_sha1);
free(private);
}
+ strbuf_release(&buf);
return 0;
}