mirror of
https://github.com/git/git.git
synced 2024-11-18 04:14:01 +01:00
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>
This commit is contained in:
parent
72ff894308
commit
b962dbdc80
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user