diff options
author | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-06-27 20:01:57 +0200 |
---|---|---|
committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-06-27 20:02:05 +0200 |
commit | 5da5321d1753ed897a2597e4ad7ff1928aa7cbbc (patch) | |
tree | 6dd62c349868dce355ae3ae6ceaaa138a743e9fd | |
parent | 9ba49bb5c861651c5136ad6678fc1570801ddec1 (diff) | |
download | libgit2-5da5321d1753ed897a2597e4ad7ff1928aa7cbbc.tar.gz |
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>
-rw-r--r-- | src/transport_git.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/transport_git.c b/src/transport_git.c index ad982ef19..c7c8df00f 100644 --- a/src/transport_git.c +++ b/src/transport_git.c @@ -247,6 +247,7 @@ static int git_connect(git_transport *transport, git_net_direction direction) if (error < GIT_SUCCESS) return error; + t->parent.connected = 1; error = store_refs(t); cleanup: @@ -322,6 +323,8 @@ int git_transport_git(git_transport **out) if (t == NULL) return GIT_ENOMEM; + memset(t, 0x0, sizeof(transport_git)); + t->parent.connect = git_connect; t->parent.ls = git_ls; t->parent.close = git_close; |