Most transport implementations tend to allocate a data buffer
in the struct transport instance during transport_get() so we
need to free that data buffer when we disconnect it.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
struct bundle_transport_data *data = transport->data;
if (data->fd > 0)
close(data->fd);
+ free(data);
return 0;
}
return !!err;
}
+static int disconnect_git(struct transport *transport)
+{
+ free(transport->data);
+ return 0;
+}
+
static int is_local(const char *url)
{
const char *colon = strchr(url, ':');
ret->get_refs_list = get_refs_via_connect;
ret->fetch = fetch_refs_via_pack;
ret->push = git_transport_push;
+ ret->disconnect = disconnect_git;
data->thin = 1;
data->uploadpack = "git-upload-pack";