mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 16:22:40 +00:00
Initialize memory in git transport
At the same time, do mark the transport as connected. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
This commit is contained in:
parent
9ba49bb5c8
commit
5da5321d17
@ -247,6 +247,7 @@ static int git_connect(git_transport *transport, git_net_direction direction)
|
|||||||
if (error < GIT_SUCCESS)
|
if (error < GIT_SUCCESS)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
|
t->parent.connected = 1;
|
||||||
error = store_refs(t);
|
error = store_refs(t);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
@ -322,6 +323,8 @@ int git_transport_git(git_transport **out)
|
|||||||
if (t == NULL)
|
if (t == NULL)
|
||||||
return GIT_ENOMEM;
|
return GIT_ENOMEM;
|
||||||
|
|
||||||
|
memset(t, 0x0, sizeof(transport_git));
|
||||||
|
|
||||||
t->parent.connect = git_connect;
|
t->parent.connect = git_connect;
|
||||||
t->parent.ls = git_ls;
|
t->parent.ls = git_ls;
|
||||||
t->parent.close = git_close;
|
t->parent.close = git_close;
|
||||||
|
Loading…
Reference in New Issue
Block a user