Commit 0ddc0776 by Edward Thomson

Merge branch 'v1.7_backports' into maint/v1.7

parents 3e2baa6d ec2439bf
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#define INCLUDE_sys_git_transport_h #define INCLUDE_sys_git_transport_h
#include "git2/net.h" #include "git2/net.h"
#include "git2/oidarray.h"
#include "git2/proxy.h" #include "git2/proxy.h"
#include "git2/remote.h" #include "git2/remote.h"
#include "git2/strarray.h" #include "git2/strarray.h"
......
...@@ -153,7 +153,9 @@ int git_repository__cleanup(git_repository *repo) ...@@ -153,7 +153,9 @@ int git_repository__cleanup(git_repository *repo)
git_cache_clear(&repo->objects); git_cache_clear(&repo->objects);
git_attr_cache_flush(repo); git_attr_cache_flush(repo);
git_grafts_free(repo->grafts); git_grafts_free(repo->grafts);
repo->grafts = NULL;
git_grafts_free(repo->shallow_grafts); git_grafts_free(repo->shallow_grafts);
repo->shallow_grafts = NULL;
set_config(repo, NULL); set_config(repo, NULL);
set_index(repo, NULL); set_index(repo, NULL);
......
...@@ -162,7 +162,7 @@ static OSStatus write_cb(SSLConnectionRef conn, const void *data, size_t *len) ...@@ -162,7 +162,7 @@ static OSStatus write_cb(SSLConnectionRef conn, const void *data, size_t *len)
if (ret < 0) { if (ret < 0) {
st->error = ret; st->error = ret;
return (ret == GIT_TIMEOUT) ? return (ret == GIT_TIMEOUT) ?
errSSLNetworkTimeout : -9853 /* errSSLNetworkTimeout */:
-36 /* ioErr */; -36 /* ioErr */;
} }
...@@ -214,7 +214,7 @@ static OSStatus read_cb(SSLConnectionRef conn, void *data, size_t *len) ...@@ -214,7 +214,7 @@ static OSStatus read_cb(SSLConnectionRef conn, void *data, size_t *len)
if (ret < 0) { if (ret < 0) {
st->error = ret; st->error = ret;
error = (ret == GIT_TIMEOUT) ? error = (ret == GIT_TIMEOUT) ?
errSSLNetworkTimeout : -9853 /* errSSLNetworkTimeout */:
-36 /* ioErr */; -36 /* ioErr */;
break; break;
} else if (ret == 0) { } else if (ret == 0) {
......
...@@ -877,11 +877,12 @@ static int _git_ssh_setup_conn( ...@@ -877,11 +877,12 @@ static int _git_ssh_setup_conn(
t->current_stream = s; t->current_stream = s;
done: done:
if (known_hosts)
libssh2_knownhost_free(known_hosts);
if (error < 0) { if (error < 0) {
ssh_stream_free(*stream); ssh_stream_free(*stream);
if (known_hosts)
libssh2_knownhost_free(known_hosts);
if (session) if (session)
libssh2_session_free(session); libssh2_session_free(session);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment