8000 Backports for v1.7 by ethomson · Pull Request #6614 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

Backports for v1.7 #6614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/git2/sys/transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define INCLUDE_sys_git_transport_h

#include "git2/net.h"
#include "git2/oidarray.h"
#include "git2/proxy.h"
#include "git2/remote.h"
#include "git2/strarray.h"
Expand Down
2 changes: 2 additions & 0 deletions src/libgit2/repository.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ int git_repository__cleanup(git_repository *repo)
git_cache_clear(&repo->objects);
git_attr_cache_flush(repo);
git_grafts_free(repo->grafts);
repo->grafts = NULL;
git_grafts_free(repo->shallow_grafts);
repo->shallow_grafts = NULL;

set_config(repo, NULL);
set_index(repo, NULL);
Expand Down
4 changes: 2 additions & 2 deletions src/libgit2/streams/stransport.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static OSStatus write_cb(SSLConnectionRef conn, const void *data, size_t *len)
if (ret < 0) {
st->error = ret;
return (ret == GIT_TIMEOUT) ?
errSSLNetworkTimeout :
-9853 /* errSSLNetworkTimeout */:
-36 /* ioErr */;
}

Expand Down Expand Up @@ -214,7 +214,7 @@ static OSStatus read_cb(SSLConnectionRef conn, void *data, size_t *len)
if (ret < 0) {
st->error = ret;
error = (ret == GIT_TIMEOUT) ?
errSSLNetworkTimeout :
-9853 /* errSSLNetworkTimeout */:
-36 /* ioErr */;
break;
} else if (ret == 0) {
Expand Down
5 changes: 3 additions & 2 deletions src/libgit2/transports/ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,11 +877,12 @@ static int _git_ssh_setup_conn(
t->current_stream = s;

done:
if (known_hosts)
libssh2_knownhost_free(known_hosts);

if (error < 0) {
ssh_stream_free(*stream);

if (known_hosts)
libssh2_knownhost_free(known_hosts);
if (session)
libssh2_session_free(session);
}
Expand Down
0