[PATCH 1/8] transport-helper: fix minor leak in push_refs_with_export
Signed-off-by: Jeff King <peff@peff.net>
---
transport-helper.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/transport-helper.c b/transport-helper.c
index 660147f..b560b64 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -721,20 +721,21 @@ static int push_refs_with_export(struct transport *transport,
char *private;
unsigned char sha1[20];
if (!data->refspecs)
continue;
private = apply_refspecs(data->refspecs, data->refspec_nr, ref->name);
if (private && !get_sha1(private, sha1)) {
strbuf_addf(&buf, "^%s", private);
string_list_append(&revlist_args, strbuf_detach(&buf, NULL));
}
+ free(private);
string_list_append(&revlist_args, ref->name);
}
if (get_exporter(transport, &exporter,
export_marks, import_marks, &revlist_args))
die("Couldn't run fast-export");
data->no_disconnect_req = 1;
--
1.7.6.rc0.35.gc40cb